Search in sources :

Example 1 with ListSinkOperator

use of org.apache.hadoop.hive.ql.exec.ListSinkOperator in project hive by apache.

the class SimpleFetchOptimizer method replaceFSwithLS.

public static ListSinkOperator replaceFSwithLS(Operator<?> fileSink, String nullFormat) {
    ListSinkDesc desc = new ListSinkDesc(nullFormat);
    ListSinkOperator sink = (ListSinkOperator) OperatorFactory.get(fileSink.getCompilationOpContext(), desc);
    sink.setParentOperators(new ArrayList<Operator<? extends OperatorDesc>>());
    Operator<? extends OperatorDesc> parent = fileSink.getParentOperators().get(0);
    sink.getParentOperators().add(parent);
    parent.replaceChild(fileSink, sink);
    fileSink.setParentOperators(null);
    return sink;
}
Also used : ReduceSinkOperator(org.apache.hadoop.hive.ql.exec.ReduceSinkOperator) FileSinkOperator(org.apache.hadoop.hive.ql.exec.FileSinkOperator) SelectOperator(org.apache.hadoop.hive.ql.exec.SelectOperator) CommonJoinOperator(org.apache.hadoop.hive.ql.exec.CommonJoinOperator) FilterOperator(org.apache.hadoop.hive.ql.exec.FilterOperator) ListSinkOperator(org.apache.hadoop.hive.ql.exec.ListSinkOperator) TableScanOperator(org.apache.hadoop.hive.ql.exec.TableScanOperator) Operator(org.apache.hadoop.hive.ql.exec.Operator) ScriptOperator(org.apache.hadoop.hive.ql.exec.ScriptOperator) LimitOperator(org.apache.hadoop.hive.ql.exec.LimitOperator) ListSinkDesc(org.apache.hadoop.hive.ql.plan.ListSinkDesc) ListSinkOperator(org.apache.hadoop.hive.ql.exec.ListSinkOperator) OperatorDesc(org.apache.hadoop.hive.ql.plan.OperatorDesc)

Aggregations

CommonJoinOperator (org.apache.hadoop.hive.ql.exec.CommonJoinOperator)1 FileSinkOperator (org.apache.hadoop.hive.ql.exec.FileSinkOperator)1 FilterOperator (org.apache.hadoop.hive.ql.exec.FilterOperator)1 LimitOperator (org.apache.hadoop.hive.ql.exec.LimitOperator)1 ListSinkOperator (org.apache.hadoop.hive.ql.exec.ListSinkOperator)1 Operator (org.apache.hadoop.hive.ql.exec.Operator)1 ReduceSinkOperator (org.apache.hadoop.hive.ql.exec.ReduceSinkOperator)1 ScriptOperator (org.apache.hadoop.hive.ql.exec.ScriptOperator)1 SelectOperator (org.apache.hadoop.hive.ql.exec.SelectOperator)1 TableScanOperator (org.apache.hadoop.hive.ql.exec.TableScanOperator)1 ListSinkDesc (org.apache.hadoop.hive.ql.plan.ListSinkDesc)1 OperatorDesc (org.apache.hadoop.hive.ql.plan.OperatorDesc)1