Ayush Saxena created HIVE-29508:
-----------------------------------

             Summary: Iceberg: Fix alias resolution of Metadata Tables
                 Key: HIVE-29508
                 URL: https://issues.apache.org/jira/browse/HIVE-29508
             Project: Hive
          Issue Type: Bug
            Reporter: Ayush Saxena
            Assignee: Ayush Saxena


Currently the alias for metadata table is resolved same as table.

As of now the tableName shows up for metadataTable as well as the Table
{code:java}
 */
public static String getUnescapedUnqualifiedTableName(ASTNode node) throws 
SemanticException {
  assert node.getChildCount() <= 3;
  assert node.getType() == HiveParser.TOK_TABNAME;

  if (node.getChildCount() == 2 || node.getChildCount() == 3) {
    node = (ASTNode) node.getChild(1);
  }

  String tableName = getUnescapedName(node);
  if (node.getChildCount() == 3) {
    tableName = tableName + "." + node.getChild(2);
  }
  return tableName;
} {code}
because for childCount == 3, node is overwritten here {{node = (ASTNode) 
node.getChild(1);}} so, the subsequent check {{if (node.getChildCount() == 3) 
{}} never hits



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to