@Override
    public ASTNode visitInputRef(RexInputRef inputRef) {
      ColumnInfo cI = schema.get(inputRef.getIndex());
      if (cI.agg != null) {
        return (ASTNode) ParseDriver.adaptor.dupTree(cI.agg);
      }

      if (cI.table == null || cI.table.isEmpty()) {
        return ASTBuilder.unqualifiedName(cI.column);
      } else {
        return ASTBuilder.qualifiedName(cI.table, cI.column);
      }

    }
Add PK-FK join information to the AST as a query hint
@param ast
@param join
@param swapSides whether the left and right input of the join is swapped
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java