private ASTNode pkFkHint(int fkTableIndex, boolean nonFkSideIsFiltered) {
    ParseDriver parseDriver = new ParseDriver();
    try {
      return parseDriver.parseHint(String.format("PKFK_JOIN(%d, %s)",
              fkTableIndex, nonFkSideIsFiltered ? NON_FK_FILTERED : NON_FK_NOT_FILTERED));
    } catch (ParseException e) {
      throw new RuntimeException(e);
    }
  }
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