!400 Fix TestOrcCache Jenkin error

Merge pull request !400 from Jiahao/fix-test-orc-cache-error
This commit is contained in:
i-robot 2020-12-01 07:08:54 +08:00 committed by Gitee
commit af97d84e94
1 changed files with 17 additions and 14 deletions

View File

@ -62,6 +62,9 @@ public class TestOrcCache
assertUpdate("CREATE TABLE test_drop_cache_1(id INTEGER, p1 INTEGER, p2 INTEGER) WITH (partitioned_by = ARRAY['p1', 'p2'], format = 'ORC')");
assertUpdate("CREATE TABLE test_drop_cache_2(id INTEGER, p3 INTEGER) WITH (partitioned_by = ARRAY['p3'], format = 'ORC')");
assertUpdate("CREATE TABLE test_drop_cache_3(id INTEGER, p1 INTEGER, p2 INTEGER) WITH (partitioned_by = ARRAY['p1', 'p2'], format = 'ORC')");
assertUpdate("CREATE TABLE test_drop_cache_4(id INTEGER, p3 INTEGER) WITH (partitioned_by = ARRAY['p3'], format = 'ORC')");
}
@Test
@ -303,25 +306,25 @@ public class TestOrcCache
{
SplitCacheMap splitCacheMap = SplitCacheMap.getInstance();
assertQuerySucceeds("CACHE TABLE test_drop_cache_1 WHERE p1 = 1");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_1").showPredicates().contains("(p1 = 1)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_3 WHERE p1 = 1");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_3").showPredicates().contains("(p1 = 1)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_2 WHERE p3 = 3");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_2").showPredicates().contains("(p3 = 3)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_4 WHERE p3 = 3");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_4").showPredicates().contains("(p3 = 3)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_2 WHERE p3 = 4");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_2").showPredicates().contains("(p3 = 4)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_4 WHERE p3 = 4");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_4").showPredicates().contains("(p3 = 4)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_1 WHERE p2 = 2");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_1").showPredicates().contains("(p2 = 2)"));
assertQuerySucceeds("CACHE TABLE test_drop_cache_3 WHERE p2 = 2");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_3").showPredicates().contains("(p2 = 2)"));
assertQuerySucceeds("DROP CACHE test_drop_cache_1 WHERE p1 = 1");
assertFalse(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_1").showPredicates().contains("(p1 = 1)"));
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_1").showPredicates().contains("(p2 = 2)"));
assertQuerySucceeds("DROP CACHE test_drop_cache_3 WHERE p1 = 1");
assertFalse(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_3").showPredicates().contains("(p1 = 1)"));
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_3").showPredicates().contains("(p2 = 2)"));
assertQuerySucceeds("DROP CACHE test_drop_cache_2 WHERE p3 = 4");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_2").showPredicates().contains("(p3 = 3)"));
assertFalse(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_2").showPredicates().contains("(p3 = 4)"));
assertQuerySucceeds("DROP CACHE test_drop_cache_4 WHERE p3 = 4");
assertTrue(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_4").showPredicates().contains("(p3 = 3)"));
assertFalse(splitCacheMap.tableCacheInfoMap().get("hive.tpch.test_drop_cache_4").showPredicates().contains("(p3 = 4)"));
}
@Test