private String getTableAliasFromASTNode(ASTNode selExprClause) throws SemanticException {
    // loop through the AST and find the TOK_TABALIAS object
    for (Node obj : selExprClause.getChildren()) {
      ASTNode child = (ASTNode) obj;
      if (child.getToken().getType() == HiveParser.TOK_TABALIAS) {
        return BaseSemanticAnalyzer.unescapeIdentifier(child.getChild(0).getText().toLowerCase());
      }
    }

    // Parser enforces that table alias is added, but check again
    throw new SemanticException("Alias should be specified LVJ");
  }
LateralViewPlan is a helper class holding the objects needed for generating a Calcite
plan from an ASTNode. The object is to be generated when a LATERAL_VIEW token is detected.
From the ASTNode and relevant input node information, the following objects are created:
* A HiveTableFunctionScan RelNode
* A RowResolver containing the row resolving information output from the RelNode
* The table alias for the table generated by the UDTF and Lateral View
ql/src/java/org/apache/hadoop/hive/ql/parse/relnodegen/LateralViewPlan.java