@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { return creator.addMetadata(this, new EmptyValues(schema)); }
public static PhysicalOperator convertToPop(SqlHandlerConfig config, Prel prel) throws IOException { PhysicalPlanCreator creator = new PhysicalPlanCreator(config.getContext(), PrelSequencer.getIdMap(prel)); PhysicalOperator op = prel.getPhysicalOperator(creator); return op; }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator childPOP = child.getPhysicalOperator(creator); DictionaryLookupPOP dictionaryLookupPOP = new DictionaryLookupPOP(creator.getContext().getCatalogService(), childPOP, dictionaryEncodedFields); return creator.addMetadata(this, dictionaryLookupPOP); }
private boolean initialCanVectorize(PhysicalPlanCreator creator, PhysicalOperator child){ if(!creator.getContext().getOptions().getOption(ExecConstants.ENABLE_VECTORIZED_HASHAGG)){ return false; final BatchSchema childSchema = child.getSchema(creator.getContext().getFunctionRegistry()); LogicalExpression expr = ExpressionTreeMaterializer.materializeAndCheckErrors(ne.getExpr(), childSchema, creator.getContext().getFunctionRegistry()); final LogicalExpression expr = ExpressionTreeMaterializer.materializeAndCheckErrors(ne.getExpr(), childSchema, creator.getContext().getFunctionRegistry());
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { return creator.addMetadata(this, new EasyGroupScan(tableMetadata, projectedColumns)); }
private PhysicalOperator getHashJoinPop(PhysicalPlanCreator creator, RelNode left, RelNode right, List<Integer> leftKeys, List<Integer> rightKeys) throws IOException{ final List<String> fields = getRowType().getFieldNames(); assert isUnique(fields); final List<String> leftFields = left.getRowType().getFieldNames(); final List<String> rightFields = right.getRowType().getFieldNames(); PhysicalOperator leftPop = ((Prel)left).getPhysicalOperator(creator); PhysicalOperator rightPop = ((Prel)right).getPhysicalOperator(creator); JoinRelType jtype = this.getJoinType(); final List<JoinCondition> conditions = Lists.newArrayList(); buildJoinConditions(conditions, leftFields, rightFields, leftKeys, rightKeys); final boolean vectorize = creator.getContext().getOptions().getOption(ExecConstants.ENABLE_VECTORIZED_HASHJOIN) && canVectorize(creator.getContext().getFunctionRegistry(), leftPop, rightPop, conditions); final HashJoinPOP hjoin = new HashJoinPOP(leftPop, rightPop, conditions, jtype, vectorize); return creator.addMetadata(this, hjoin); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { return creator.addMetadata(this, new ParquetGroupScan(tableMetadata, projectedColumns, filter, globalDictionaryEncodedColumns, cachedRelDataType)); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { return creator.addMetadata(this, new HiveGroupScan(tableMetadata, projectedColumns, filter)); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { List<PhysicalOperator> inputPops = Lists.newArrayList(); for (int i = 0; i < this.getInputs().size(); i++) { inputPops.add( ((Prel)this.getInputs().get(i)).getPhysicalOperator(creator)); } UnionAll unionall = new UnionAll(inputPops); return creator.addMetadata(this, unionall); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { List<PhysicalOperator> inputPops = Lists.newArrayList(); for (int i = 0; i < this.getInputs().size(); i++) { inputPops.add( ((Prel)this.getInputs().get(i)).getPhysicalOperator(creator)); } ///TODO: change this to UnionDistinct once implemented end-to-end.. UnionAll unionAll = new UnionAll(inputPops); return creator.addMetadata(this, unionAll); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { return creator.addMetadata(this, new SystemGroupScan(systemTable, getProjectedColumns(), executorCount, pluginId)); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); StreamingAggregate g = new StreamingAggregate(child.getPhysicalOperator(creator), keys, aggExprs, 1.0f); return creator.addMetadata(this, g); }
public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator childPOP = child.getPhysicalOperator(creator); RoundRobinExchange g = new RoundRobinExchange(childPOP); return creator.addMetadata(this, g); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { final RelMetadataQuery mq = input.getCluster().getMetadataQuery(); return creator.addMetadata(this, scanBuilder.toGroupScan(mq.getRowCount(input).longValue())); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator g = new WriterCommitterPOP(tempLocation, finalLocation, userName, plugin, child.getPhysicalOperator(creator)); return creator.addMetadata(this, g); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { ConvertFromJsonPOP p = new ConvertFromJsonPOP(((Prel) getInput()).getPhysicalOperator(creator), conversions); return creator.addMetadata(this, p); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { SelectionVectorRemover r = new SelectionVectorRemover( ((Prel)getInput()).getPhysicalOperator(creator)); return creator.addMetadata(this, r); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator childPOP = child.getPhysicalOperator(creator); UnorderedMuxExchange p = new UnorderedMuxExchange(childPOP); return creator.addMetadata(this, p); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator childPOP = child.getPhysicalOperator(creator); UnionExchange g = new UnionExchange(childPOP); return creator.addMetadata(this, g); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { ComplexToJson p = new ComplexToJson(((Prel) getInput()).getPhysicalOperator(creator)); return creator.addMetadata(this, p); }