zhangbutao commented on code in PR #6252:
URL: https://github.com/apache/hive/pull/6252#discussion_r2652627443


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/FromClauseParser.g:
##########
@@ -243,12 +243,27 @@ tableName
 @init { gParent.pushMsg("table name", state); }
 @after { gParent.popMsg(state); }
     :
-    db=identifier DOT tab=identifier (DOT meta=identifier)?
-    {tables.add(new ImmutablePair<>($db.text, $tab.text));}
-    -> ^(TOK_TABNAME $db $tab $meta?)
-    |
-    tab=identifier
-    {tables.add(new ImmutablePair<>(null, $tab.text));}
+    // case 1:catalog.db.table(.meta)?
+    (cat=identifier DOT db=identifier DOT tab=identifier (DOT 
meta=identifier)?)
+    =>
+    cat=identifier DOT db=identifier DOT tab=identifier (DOT meta=identifier)?
+    {
+        tables.add(new ImmutablePair<>($cat.text + "." + $db.text, $tab.text));
+    }
+    -> ^(TOK_TABNAME $cat $db $tab $meta?)
+
+    // case 2:db.table

Review Comment:
   Yes. There will be a breaking change here. We cannot distinguish between the 
semantic expressions `cat.db.tbl` and `db.tbl.meta`, so for Iceberg's meta 
tables, I will switch to using the format `cat.db.tbl.meta`, or reference 
Trino's approach as shown at 
https://trino.io/docs/current/connector/iceberg.html#metadata-tables, for 
example: `SELECT * FROM "test_table$properties"`. In any case, this will cause 
backward compatibility issues. 
   
   Regarding this breaking change, I will initiate a discussion in the dev 
community mailing list to see if anyone has better suggestions.



-- 
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]

Reply via email to