/** * Create a DruidQueryRel representing a full scan. */ public static DruidQueryRel fullScan( final LogicalTableScan scanRel, final RelOptTable table, final DruidTable druidTable, final QueryMaker queryMaker ) { return new DruidQueryRel( scanRel.getCluster(), scanRel.getCluster().traitSetOf(Convention.NONE), table, druidTable, queryMaker, PartialDruidQuery.create(scanRel) ); }
/** * Create a DruidQueryRel representing a full scan. */ public static DruidQueryRel fullScan( final LogicalTableScan scanRel, final RelOptTable table, final DruidTable druidTable, final QueryMaker queryMaker ) { return new DruidQueryRel( scanRel.getCluster(), scanRel.getCluster().traitSetOf(Convention.NONE), table, druidTable, queryMaker, PartialDruidQuery.create(scanRel) ); }
@Override public void onMatch(RelOptRuleCall call) { final LogicalTableScan scan = call.rel(0); final RelOptTable table = scan.getTable(); if (BindableTableScan.canHandle(table)) { call.transformTo( BindableTableScan.create(scan.getCluster(), table)); } } }
public void onMatch(RelOptRuleCall call) { final LogicalTableScan oldRel = call.rel(0); RelNode newRel = oldRel.getTable().toRel( RelOptUtil.getContext(oldRel.getCluster())); call.transformTo(newRel); } }
@Override public void onMatch(RelOptRuleCall call) { final LogicalTableScan scan = call.rel(0); final RelOptTable table = scan.getTable(); if (BindableTableScan.canHandle(table)) { call.transformTo( BindableTableScan.create(scan.getCluster(), table)); } } }
public void onMatch(RelOptRuleCall call) { final LogicalTableScan oldRel = call.rel(0); RelNode newRel = oldRel.getTable().toRel( ViewExpanders.simpleContext(oldRel.getCluster())); call.transformTo(newRel); } }
@Override public RelNode convert(RelNode rel) { LogicalTableScan scan = (LogicalTableScan) rel; final RelOptTable relOptTable = scan.getTable(); final Table table = relOptTable.unwrap(Table.class); if (!EnumerableTableScan.canHandle(table)) { return null; } final Expression expression = relOptTable.getExpression(Object.class); if (expression == null) { return null; } return EnumerableTableScan.create(scan.getCluster(), relOptTable); } }
@Override public RelNode convert(RelNode rel) { LogicalTableScan scan = (LogicalTableScan) rel; final RelOptTable relOptTable = scan.getTable(); final Table table = relOptTable.unwrap(Table.class); if (!EnumerableTableScan.canHandle(table)) { return null; } final Expression expression = relOptTable.getExpression(Object.class); if (expression == null) { return null; } return EnumerableTableScan.create(scan.getCluster(), relOptTable); } }