Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
Signed-off-by: shuming.li <[email protected]>
  • Loading branch information
LiShuMing committed Dec 31, 2024
1 parent 9a4222d commit bf81bb5
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1535,4 +1535,20 @@ public long getDataSize() {
}
}

@Test
public void testGetCollectibleColumns() throws Exception {
starRocksAssert.withTable("CREATE TABLE test.t_gen_col (" +
" c1 datetime NOT NULL," +
" c2 bigint," +
" c3 DATETIME NULL AS date_trunc('month', c1) " +
" ) " +
" DUPLICATE KEY(c1) " +
" PARTITION BY (c2, c3) " +
" PROPERTIES('replication_num'='1')");
Table table = starRocksAssert.getTable("test", "t_gen_col");
List<String> cols = StatisticUtils.getCollectibleColumns(table);
Assert.assertTrue(cols.size() == 2);
Assert.assertTrue(!cols.contains("c3"));
starRocksAssert.dropTable("test.t_gen_col");
}
}

0 comments on commit bf81bb5

Please sign in to comment.