public List<Table> intoTables(ParserRuleContext ctx, List<String> names) {
    List<Table> tables = new ArrayList<>();
    for (String name : names) {
      Var var = findVariable(name);
      if (var == null) {
        trace(ctx, "Variable not found: " + name);
      } else if (var.type == Type.HPL_OBJECT && var.value instanceof Table) {
        tables.add((Table)var.value);
      } else {
        throw new TypeException(ctx, Table.class, var.type, var.value);
      }
    }
    if (tables.size() > 1 && tables.stream().anyMatch(tbl -> tbl.hplClass().rowType())) {
      throw new TypeException(ctx, "rowtype table should not be used when selecting into multiple tables");
    }
    return tables;
  }
@return either 1 rowtype OR 1 single column table OR n single column tables
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java