Skip to content

Commit a4be9ad

Browse files
committed
address review comments: add test when engine has special characters
1 parent ae361bf commit a4be9ad

File tree

1 file changed

+14
-0
lines changed
  • standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore

1 file changed

+14
-0
lines changed

standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,12 @@ public void testTableStatisticsOps() throws Exception {
955955
Assert.assertEquals(0, tabColStats.size());
956956
}
957957

958+
@Test
959+
public void testDeleteTableColumnStatisticsWhenEngineHasSpecialCharacter() throws Exception {
960+
createPartitionedTable(true, true);
961+
objectStore.deleteTableColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1, "test_col1", "special '");
962+
}
963+
958964
@Test
959965
public void testPartitionStatisticsOps() throws Exception {
960966
createPartitionedTable(true, true);
@@ -1006,6 +1012,14 @@ public void testPartitionStatisticsOps() throws Exception {
10061012
Assert.assertEquals(0, stat.size());
10071013
}
10081014

1015+
@Test
1016+
public void testDeletePartitionColumnStatisticsWhenEngineHasSpecialCharacter() throws Exception {
1017+
createPartitionedTable(true, true);
1018+
objectStore.deletePartitionColumnStatistics(DEFAULT_CATALOG_NAME, DB1, TABLE1,
1019+
"test_part_col=a2", List.of("a2"), null, "special '");
1020+
}
1021+
1022+
10091023
@Test
10101024
public void testAggrStatsUseDB() throws Exception {
10111025
Configuration conf2 = MetastoreConf.newMetastoreConf(conf);

0 commit comments

Comments
 (0)