public boolean isTrivial(){ Integer last = getLast(); if(last != null && last <= PrelUtil.getPlannerSettings(getCluster()).getSliceTarget() ){ return true; } else { return false; } }
private Prel convert(SelectionVectorMode[] encodings, Prel prel) { for (SelectionVectorMode m : encodings) { if (prel.getEncoding() == m) { return prel; } } return new SelectionVectorRemoverPrel(prel); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator g = getCreateTableEntry().getWriter(child.getPhysicalOperator(creator)); return creator.addMetadata(this, g); }
public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { Prel child = (Prel) this.getInput(); PhysicalOperator childPOP = child.getPhysicalOperator(creator); HashToMergeExchange g = new HashToMergeExchange(childPOP, HashPrelUtil.getHashExpression(this.distFields, getInput().getRowType()), PrelUtil.getOrdering(this.collation, getInput().getRowType())); return creator.addMetadata(this, g); }
@Override public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException { PhysicalOperator child = ((Prel) this.getInput()).getPhysicalOperator(creator); HashAggregate g = new HashAggregate(child, keys, aggExprs, canVectorize(creator, child), 1.0f); return creator.addMetadata(this, g); }
@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); }
@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); }
@Override public BatchSchema.SelectionVectorMode getEncoding() { return ((Prel)getInput()).getEncoding(); }
public static Prel removeSvIfRequired(Prel prel, SelectionVectorMode... allowed) { SelectionVectorMode current = prel.getEncoding(); for (SelectionVectorMode m : allowed) { if (current == m) { return prel; } } return new SelectionVectorRemoverPrel(prel); }