use of io.mycat.calcite.table.MycatPhysicalTable in project Mycat2 by MyCATApache.
the class HBTQueryConvertor method toPhyTable.
private RelNode toPhyTable(MycatLogicTable unwrap, Iterable<Partition> dataNodes) {
int count = 0;
for (Partition partition : dataNodes) {
MycatPhysicalTable mycatPhysicalTable = new MycatPhysicalTable(unwrap, partition);
LogicalTableScan tableScan = LogicalTableScan.create(relBuilder.getCluster(), RelOptTableImpl.create(relBuilder.getRelOptSchema(), unwrap.getRowType(), mycatPhysicalTable, ImmutableList.of(partition.getSchema(), partition.getTable())), ImmutableList.of());
count++;
relBuilder.push(tableScan);
}
return relBuilder.union(true, count).build();
}
Aggregations