@Override
    public ASTNode visitLiteral(RexLiteral literal) {

      if (RexUtil.isNull(literal) && literal.getType().getSqlTypeName() != SqlTypeName.NULL
          && rexBuilder != null) {
        // It is NULL value with different type, we need to introduce a CAST
        // to keep it
        if(nullLiteralMap.containsKey(literal)) {
          return ASTBuilder.literal(literal);
        }
        nullLiteralMap.put(literal, true);
        RexNode r = rexBuilder.makeAbstractCast(literal.getType(), literal);

        return r.accept(this);
      }
      return ASTBuilder.literal(literal);
    }
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