deniskuzZ commented on code in PR #6379:
URL: https://github.com/apache/hive/pull/6379#discussion_r3001182945
##########
llap-server/src/test/org/apache/hadoop/hive/llap/cache/TestCacheContentsTracker.java:
##########
@@ -53,16 +52,20 @@ public static void setup() {
*/
@Test
public void testParentCacheTagGeneration() {
- CacheTag db = cacheTagBuilder("dbname");
- CacheTag table = cacheTagBuilder("dbname.tablename");
- CacheTag p = cacheTagBuilder("dbname.tablename", "p=v1");
- CacheTag pp = cacheTagBuilder("dbname.tablename", "p=v1", "pp=vv1");
- CacheTag ppp = cacheTagBuilder("dbname.tablename", "p=v1", "pp=vv1",
"ppp=vvv1");
+ // DB-level tag: tableName = "hive.dbname" (catalog prepended, one dot).
+ CacheTag db = cacheTagBuilder(Warehouse.DEFAULT_CATALOG_NAME + ".dbname");
+ // Table-level tag: tableName = "hive.dbname.tablename" (two dots).
+ CacheTag table = cacheTagBuilder(Warehouse.DEFAULT_CATALOG_NAME +
".dbname.tablename");
+ CacheTag p = cacheTagBuilder(Warehouse.DEFAULT_CATALOG_NAME +
".dbname.tablename", "p=v1");
+ CacheTag pp = cacheTagBuilder(Warehouse.DEFAULT_CATALOG_NAME +
".dbname.tablename", "p=v1", "pp=vv1");
+ CacheTag ppp = cacheTagBuilder(Warehouse.DEFAULT_CATALOG_NAME +
".dbname.tablename", "p=v1", "pp=vv1", "ppp=vvv1");
assertTrue(pp.compareTo(CacheTag.createParentCacheTag(ppp)) == 0);
assertTrue(p.compareTo(CacheTag.createParentCacheTag(pp)) == 0);
assertTrue(table.compareTo(CacheTag.createParentCacheTag(p)) == 0);
+ // createParentCacheTag(table) strips the table part → "hive.dbname" which
equals db.
Review Comment:
leftover? should we drop this?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]