Search in sources :

Example 6 with HazelcastRelOptTable

use of com.hazelcast.jet.sql.impl.schema.HazelcastRelOptTable in project hazelcast by hazelcast.

the class OptUtils method createLogicalScan.

public static LogicalTableScan createLogicalScan(TableScan originalScan, HazelcastTable newHazelcastTable) {
    HazelcastRelOptTable originalRelTable = (HazelcastRelOptTable) originalScan.getTable();
    HazelcastRelOptTable newTable = createRelTable(originalRelTable, newHazelcastTable, originalScan.getCluster().getTypeFactory());
    return LogicalTableScan.create(originalScan.getCluster(), newTable, originalScan.getHints());
}
Also used : HazelcastRelOptTable(com.hazelcast.jet.sql.impl.schema.HazelcastRelOptTable)

Example 7 with HazelcastRelOptTable

use of com.hazelcast.jet.sql.impl.schema.HazelcastRelOptTable in project hazelcast by hazelcast.

the class OptUtils method createLogicalScan.

public static LogicalTableScan createLogicalScan(RelOptCluster cluster, HazelcastTable hazelcastTable) {
    JetTable table = hazelcastTable.getTarget();
    HazelcastRelOptTable relTable = createRelTable(table.getQualifiedName(), hazelcastTable, cluster.getTypeFactory());
    return LogicalTableScan.create(cluster, relTable, ImmutableList.of());
}
Also used : HazelcastRelOptTable(com.hazelcast.jet.sql.impl.schema.HazelcastRelOptTable) JetTable(com.hazelcast.jet.sql.impl.schema.JetTable)

Aggregations

HazelcastRelOptTable (com.hazelcast.jet.sql.impl.schema.HazelcastRelOptTable)7 HazelcastTable (com.hazelcast.jet.sql.impl.schema.HazelcastTable)4 RexNode (org.apache.calcite.rex.RexNode)4 IndexScanMapPhysicalRel (com.hazelcast.jet.sql.impl.opt.physical.IndexScanMapPhysicalRel)2 RelOptTable (org.apache.calcite.plan.RelOptTable)2 RelTraitSet (org.apache.calcite.plan.RelTraitSet)2 RelCollation (org.apache.calcite.rel.RelCollation)2 JetTable (com.hazelcast.jet.sql.impl.schema.JetTable)1 IndexFilter (com.hazelcast.sql.impl.exec.scan.index.IndexFilter)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 RelOptTableImpl (org.apache.calcite.prepare.RelOptTableImpl)1 Filter (org.apache.calcite.rel.core.Filter)1 Project (org.apache.calcite.rel.core.Project)1 RelDataType (org.apache.calcite.rel.type.RelDataType)1 RexBuilder (org.apache.calcite.rex.RexBuilder)1