use of org.apache.drill.common.JSONOptions in project drill by axbaretto.
the class DefaultSqlHandler method convertToPlan.
protected PhysicalPlan convertToPlan(PhysicalOperator op) {
PlanPropertiesBuilder propsBuilder = PlanProperties.builder();
propsBuilder.type(PlanType.APACHE_DRILL_PHYSICAL);
propsBuilder.version(1);
propsBuilder.options(new JSONOptions(context.getOptions().getOptionList()));
propsBuilder.resultMode(ResultMode.EXEC);
propsBuilder.generator(this.getClass().getSimpleName(), "");
return new PhysicalPlan(propsBuilder.build(), getPops(op));
}
use of org.apache.drill.common.JSONOptions in project drill by apache.
the class BasicOptimizer method optimize.
@Override
public PhysicalPlan optimize(final OptimizationContext context, final LogicalPlan plan) throws OptimizerException {
final Object obj = new Object();
final Collection<SinkOperator> roots = plan.getGraph().getRoots();
final List<PhysicalOperator> physOps = new ArrayList<>(roots.size());
final LogicalConverter converter = new LogicalConverter(plan);
for (SinkOperator op : roots) {
final PhysicalOperator pop = op.accept(converter, obj);
physOps.add(pop);
}
final PlanProperties logicalProperties = plan.getProperties();
final PlanProperties props = PlanProperties.builder().type(PlanProperties.PlanType.APACHE_DRILL_PHYSICAL).version(logicalProperties.version).generator(logicalProperties.generator).options(new JSONOptions(context.getOptions().getOptionList())).build();
return new PhysicalPlan(props, physOps);
}
use of org.apache.drill.common.JSONOptions in project drill by apache.
the class DrillScanRel method implement.
@Override
public LogicalOperator implement(DrillImplementor implementor) {
Scan.Builder builder = Scan.builder();
builder.storageEngine(drillTable.getStorageEngineName());
builder.selection(new JSONOptions(drillTable.getSelection()));
implementor.registerSource(drillTable);
return builder.build();
}
use of org.apache.drill.common.JSONOptions in project drill by apache.
the class DefaultSqlHandler method convertToPlan.
protected PhysicalPlan convertToPlan(PhysicalOperator op) {
PlanPropertiesBuilder propsBuilder = PlanProperties.builder();
propsBuilder.type(PlanType.APACHE_DRILL_PHYSICAL);
propsBuilder.version(1);
propsBuilder.options(new JSONOptions(context.getOptions().getOptionList()));
propsBuilder.resultMode(ResultMode.EXEC);
propsBuilder.generator(this.getClass().getSimpleName(), "");
PhysicalPlan plan = new PhysicalPlan(propsBuilder.build(), getPops(op));
return plan;
}
use of org.apache.drill.common.JSONOptions in project drill by axbaretto.
the class DrillScanRel method implement.
@Override
public LogicalOperator implement(DrillImplementor implementor) {
Scan.Builder builder = Scan.builder();
builder.storageEngine(drillTable.getStorageEngineName());
builder.selection(new JSONOptions(drillTable.getSelection()));
implementor.registerSource(drillTable);
return builder.build();
}
Aggregations