bowenli86 commented on a change in pull request #8636: 
[FLINK-12237][hive]Support Hive table stats related operations in HiveCatalog
URL: https://github.com/apache/flink/pull/8636#discussion_r293934696
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/test/java/org/apache/flink/table/catalog/CatalogTestBase.java
 ##########
 @@ -1082,6 +1083,64 @@ public void testListPartitionPartialSpec() throws 
Exception {
                assertEquals(1, catalog.listPartitions(path1, 
createAnotherPartitionSpecSubset()).size());
        }
 
+
+       // ------ table and column stats ------
+
+       @Test
+       public void testGetTableStats_TableNotExistException() throws Exception{
+               catalog.createDatabase(db1, createDb(), false);
+               
exception.expect(org.apache.flink.table.api.TableNotExistException.class);
+               catalog.getTableStatistics(path1);
+       }
+
+       @Test
+       public void testGetPartitionStats() throws Exception{
+               catalog.createDatabase(db1, createDb(), false);
+               catalog.createTable(path1, createPartitionedTable(), false);
+               catalog.createPartition(path1, createPartitionSpec(), 
createPartition(), false);
+               // there're essentially no stats, so nothing to assert
+               catalog.getPartitionStatistics(path1, createPartitionSpec());
 
 Review comment:
   shouldn't we just assert every stats is the default value which is `0`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to