@Override public RelNode toRel(final RelOptTable.ToRelContext context, final RelOptTable table) { return LogicalTableScan.create(context.getCluster(), table); }
@Override public RelNode toRel(ToRelContext context) { return new LogicalTableScan(context.getCluster(), this); }
@Override public void onMatch(final RelOptRuleCall call) { final LogicalTableScan scan = call.rel(0); final RelOptTable table = scan.getTable(); final DruidTable druidTable = table.unwrap(DruidTable.class); if (druidTable != null) { call.transformTo( DruidQueryRel.fullScan(scan, table, druidTable, queryMaker) ); } } }
@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)); } } }
private void checkCollation(RelOptCluster cluster, RelOptTable empTable, RelOptTable deptTable) { final RexBuilder rexBuilder = cluster.getRexBuilder(); final LogicalTableScan empScan = LogicalTableScan.create(cluster, empTable); RelMdCollation.table(empScan.getTable()); assertThat(collations.size(), equalTo(0)); LogicalTableScan.create(cluster, deptTable);
private RelNode copyOf(LogicalTableScan rel) { return new LogicalTableScan( cluster, copyOf(rel.getTraitSet()), rel.getTable() ); }
final RexBuilder rexBuilder = cluster.getRexBuilder(); final RelMetadataQuery mq = RelMetadataQuery.instance(); final LogicalTableScan empScan = LogicalTableScan.create(cluster, empTable); equalTo(empScan.getRowType().getFieldCount())); assertThat(columnSizes, equalTo(Arrays.asList(4.0, 40.0, 20.0, 4.0, 8.0, 4.0, 4.0, 4.0, 1.0))); LogicalTableScan.create(cluster, deptTable); final LogicalFilter filter = LogicalFilter.create(deptScan,
/** * 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)); } } }
private void checkCollation(RelOptCluster cluster, RelOptTable empTable, RelOptTable deptTable) { final RexBuilder rexBuilder = cluster.getRexBuilder(); final LogicalTableScan empScan = LogicalTableScan.create(cluster, empTable); RelMdCollation.table(empScan.getTable()); assertThat(collations.size(), equalTo(0)); LogicalTableScan.create(cluster, deptTable);
final RexBuilder rexBuilder = cluster.getRexBuilder(); final RelMetadataQuery mq = RelMetadataQuery.instance(); final LogicalTableScan empScan = LogicalTableScan.create(cluster, empTable); equalTo(empScan.getRowType().getFieldCount())); assertThat(columnSizes, equalTo(Arrays.asList(4.0, 40.0, 20.0, 4.0, 8.0, 4.0, 4.0, 4.0, 1.0))); LogicalTableScan.create(cluster, deptTable); final LogicalFilter filter = LogicalFilter.create(deptScan,
/** * 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) ); }
public RelNode createScan(RelOptCluster cluster, RelOptTable table) { return LogicalTableScan.create(cluster, 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 toRel(ToRelContext context) { return new LogicalTableScan(context.getCluster(), this); }
@Override public void onMatch(final RelOptRuleCall call) { final LogicalTableScan scan = call.rel(0); final RelOptTable table = scan.getTable(); final DruidTable druidTable = table.unwrap(DruidTable.class); if (druidTable != null) { call.transformTo( DruidQueryRel.fullScan(scan, table, druidTable, queryMaker) ); } } }
public RelNode createScan(RelOptCluster cluster, RelOptTable table) { return LogicalTableScan.create(cluster, 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 RelNode toRel(ToRelContext context) { return new LogicalTableScan(context.getCluster(), this); }
@Override public RelNode toRel(final RelOptTable.ToRelContext context, final RelOptTable table) { return LogicalTableScan.create(context.getCluster(), table); }