public void singleInClauseSql(HplsqlParser.Bool_expr_single_inContext ctx, StringBuilder sql) {    
    sql.append(evalPop(ctx.expr(0)).toString() + " ");
    exec.append(sql, exec.nvl(ctx.T_NOT(), ctx.T_IN()), ctx.T_OPEN_P());
    if (ctx.select_stmt() != null) {
      exec.append(sql, evalPop(ctx.select_stmt()).toString(), ctx.T_OPEN_P().getSymbol(), ctx.select_stmt().getStart());
      exec.append(sql, ctx.T_CLOSE_P().getText(), ctx.select_stmt().stop, ctx.T_CLOSE_P().getSymbol());
    }
    else {
      int cnt = ctx.expr().size();
      for (int i = 1; i < cnt; i++) {
        sql.append(evalPop(ctx.expr(i)).toString());
        if (i + 1 < cnt) {
          sql.append(", ");
        }
      }
      sql.append(")");
    }    
  }
Single value IN clause in executable SQL statement
hplsql/src/main/java/org/apache/hive/hplsql/Expression.java