Aggarwal-Raghav commented on code in PR #6252:
URL: https://github.com/apache/hive/pull/6252#discussion_r2650757344


##########
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:
   @zhangbutao , For iceberg meta tables like snapshots, files etc. the `select 
* from db.tbl.meta` should work which is the existing behaviour. Meaning, case 
2 should have `meta?` IMO.



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