Search in sources :

Example 1 with PlanNodeSchema

use of com.hazelcast.sql.impl.plan.node.PlanNodeSchema in project hazelcast by hazelcast.

the class FullScanPhysicalRel method projection.

public List<Expression<?>> projection(QueryParameterMetadata parameterMetadata) {
    PlanNodeSchema schema = OptUtils.schema(getTable());
    HazelcastTable table = getTable().unwrap(HazelcastTable.class);
    return project(schema, table.getProjects(), parameterMetadata);
}
Also used : PlanNodeSchema(com.hazelcast.sql.impl.plan.node.PlanNodeSchema) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Example 2 with PlanNodeSchema

use of com.hazelcast.sql.impl.plan.node.PlanNodeSchema in project hazelcast by hazelcast.

the class FullScanPhysicalRel method filter.

public Expression<Boolean> filter(QueryParameterMetadata parameterMetadata) {
    PlanNodeSchema schema = OptUtils.schema(getTable());
    RexNode filter = getTable().unwrap(HazelcastTable.class).getFilter();
    return filter(schema, filter, parameterMetadata);
}
Also used : PlanNodeSchema(com.hazelcast.sql.impl.plan.node.PlanNodeSchema) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable) RexNode(org.apache.calcite.rex.RexNode)

Example 3 with PlanNodeSchema

use of com.hazelcast.sql.impl.plan.node.PlanNodeSchema in project hazelcast by hazelcast.

the class IndexScanMapPhysicalRel method projection.

public List<Expression<?>> projection(QueryParameterMetadata parameterMetadata) {
    PlanNodeSchema schema = OptUtils.schema(getTable());
    HazelcastTable table = getTable().unwrap(HazelcastTable.class);
    return project(schema, table.getProjects(), parameterMetadata);
}
Also used : PlanNodeSchema(com.hazelcast.sql.impl.plan.node.PlanNodeSchema) HazelcastTable(com.hazelcast.jet.sql.impl.schema.HazelcastTable)

Example 4 with PlanNodeSchema

use of com.hazelcast.sql.impl.plan.node.PlanNodeSchema in project hazelcast by hazelcast.

the class JoinPhysicalRel method schema.

@Override
public PlanNodeSchema schema(QueryParameterMetadata parameterMetadata) {
    PlanNodeSchema leftSchema = ((PhysicalRel) getLeft()).schema(parameterMetadata);
    PlanNodeSchema rightSchema = ((PhysicalRel) getRight()).schema(parameterMetadata);
    return PlanNodeSchema.combine(leftSchema, rightSchema);
}
Also used : PlanNodeSchema(com.hazelcast.sql.impl.plan.node.PlanNodeSchema)

Example 5 with PlanNodeSchema

use of com.hazelcast.sql.impl.plan.node.PlanNodeSchema in project hazelcast by hazelcast.

the class SortPhysicalRel method fetch.

public Expression<?> fetch(QueryParameterMetadata parameterMetadata) {
    PlanNodeSchema schema = schema(parameterMetadata);
    RexVisitor<Expression<?>> visitor = OptUtils.createRexToExpressionVisitor(schema, parameterMetadata);
    return fetch.accept(visitor);
}
Also used : Expression(com.hazelcast.sql.impl.expression.Expression) PlanNodeSchema(com.hazelcast.sql.impl.plan.node.PlanNodeSchema)

Aggregations

PlanNodeSchema (com.hazelcast.sql.impl.plan.node.PlanNodeSchema)6 HazelcastTable (com.hazelcast.jet.sql.impl.schema.HazelcastTable)3 Expression (com.hazelcast.sql.impl.expression.Expression)2 RexNode (org.apache.calcite.rex.RexNode)1