Examples of SelectDesc


Examples of org.apache.hadoop.hive.ql.plan.selectDesc

      earr.add(exprDesc1);
      earr.add(exprDesc2);
      ArrayList<String> outputCols = new ArrayList<String>();
      for (int i = 0; i < earr.size(); i++)
        outputCols.add("_col"+i);
      selectDesc selectCtx = new selectDesc(earr, outputCols);
      Operator<selectDesc> op = OperatorFactory.get(selectDesc.class);
      op.setConf(selectCtx);

      // fileSinkOperator to dump the output of the select
      //fileSinkDesc fsd = new fileSinkDesc ("file:///tmp" + File.separator + System.getProperty("user.name") + File.separator + "TestFileSinkOperator",
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

      earr.add(exprDesc1);
      earr.add(exprDesc2);
      ArrayList<String> outputCols = new ArrayList<String>();
      for (int i = 0; i < earr.size(); i++)
        outputCols.add("_col"+i);
      selectDesc selectCtx = new selectDesc(earr, outputCols);
      Operator<selectDesc> op = OperatorFactory.get(selectDesc.class);
      op.setConf(selectCtx);

      // scriptOperator to echo the output of the select
      tableDesc scriptOutput = PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "a,b");
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

    Operator<fileSinkDesc> op4 = OperatorFactory.get(new fileSinkDesc
                                                     (tmpdir + "mapredplan3.out",
                                                      Utilities.defaultTd, false));

    Operator<selectDesc> op5 =  OperatorFactory.get
      (new selectDesc
       (Utilities.makeList
        (getStringColumn(Utilities.ReduceField.ALIAS.toString()),
         new exprNodeFieldDesc(TypeInfoFactory.stringTypeInfo,
             new exprNodeColumnDesc(TypeInfoFactory.getListTypeInfo(
                 TypeInfoFactory.stringTypeInfo),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

                    TextRecordWriter.class,
        PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "tkey,tvalue"),
        TextRecordReader.class),
     op1);

    Operator<selectDesc> op4 = OperatorFactory.get(new selectDesc(
                                     Utilities.makeList(getStringColumn("key"),
                                                        getStringColumn("value")), outputColumns), op0);

    Utilities.addMapWork(mr, src, "a", op4);
    mr.setKeyDesc(op1.getConf().getKeySerializeInfo());
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

        Utilities.makeList(getStringColumn("0"),
                           getStringColumn("1")),
                           outputColumns, false,
        -1, 1, -1));

    Operator<selectDesc> op4 = OperatorFactory.get(new selectDesc(
                                     Utilities.makeList(getStringColumn("key"),
                                                        getStringColumn("value")), outputColumns), op0);

    Utilities.addMapWork(mr, src, "a", op4);
    mr.setKeyDesc(op0.getConf().getKeySerializeInfo());
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

                      TextRecordWriter.class,
          PlanUtils.getDefaultTableDesc("" + Utilities.tabCode, "tkey,tvalue"),
          TextRecordReader.class),
       op1);

    Operator<selectDesc> op4 = OperatorFactory.get(new selectDesc(
                                     Utilities.makeList(getStringColumn("key"),
                                                        getStringColumn("value")), outputColumns), op0);

    Utilities.addMapWork(mr, src, "a", op4);
    mr.setKeyDesc(op1.getConf().getKeySerializeInfo());
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

      colExprMap.put(outputCol, col_list.get(i));
      columnNames.add(outputCol);
    }

    Operator output = putOpInsertMap(OperatorFactory.getAndMakeChild(
        new selectDesc(col_list, columnNames, selectStar), new RowSchema(out_rwsch.getColumnInfos()),
        input), out_rwsch);

    output.setColumnExprMap(colExprMap);
    if (isInTransform) {
      output = genScriptPlan(trfm, qb, output);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

        String name = getColumnInternalName(i);
        rowResolver.put("", name, new ColumnInfo(name, expressions.get(i).getTypeInfo(), "", false));
        colName.add(name);
      }
      Operator output = putOpInsertMap(OperatorFactory.getAndMakeChild(
        new selectDesc(expressions, colName), new RowSchema(rowResolver.getColumnInfos()), input), rowResolver);

      return output;
    } else {
      // not converted
      return input;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

    }

    // create selection operator
    Operator output = putOpInsertMap(
                        OperatorFactory.getAndMakeChild(
                          new selectDesc(colList, columnNames, false),
                          new RowSchema(inputRR.getColumnInfos()),
                          input),
                        inputRR);

    output.setColumnExprMap(input.getColumnExprMap());
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.selectDesc

      colList.add(new exprNodeColumnDesc(col.getType(), col.getInternalName(),
                                         col.getTabAlias(), col.getIsPartitionCol()));
      columnNames.add(col.getInternalName());
    }
    Operator output = putOpInsertMap(OperatorFactory.getAndMakeChild(
        new selectDesc(colList, columnNames, true), new RowSchema(inputRR.getColumnInfos()), input), inputRR);
    output.setColumnExprMap(input.getColumnExprMap());
    return output;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.