Class FlinkRelBuilder
- java.lang.Object
-
- org.apache.calcite.tools.RelBuilder
-
- org.apache.flink.table.planner.calcite.FlinkRelBuilder
-
@Internal public final class FlinkRelBuilder extends RelBuilder
Flink-specificRelBuilder
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.tools.RelBuilder
RelBuilder.AggCall, RelBuilder.Config, RelBuilder.GroupKey, RelBuilder.OverCall
-
-
Field Summary
Fields Modifier and Type Field Description static RelBuilder.Config
FLINK_REL_BUILDER_CONFIG
-
Fields inherited from class org.apache.calcite.tools.RelBuilder
cluster, relOptSchema
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelBuilder
aggregate(RelBuilder.GroupKey groupKey, Iterable<RelBuilder.AggCall> aggCalls)
Build non-window aggregate for either aggregate or table aggregate.RelBuilder
expand(List<List<org.apache.calcite.rex.RexNode>> projects, int expandIdIndex)
org.apache.flink.table.planner.calcite.FlinkTypeFactory
getTypeFactory()
Returns the type factory.static FlinkRelBuilder
of(org.apache.calcite.plan.Context context, org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptSchema relOptSchema)
static FlinkRelBuilder
of(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptSchema relOptSchema)
static org.apache.calcite.tools.RelBuilderFactory
proto(org.apache.calcite.plan.Context context)
static RelBuilder
pushFunctionScan(RelBuilder relBuilder, org.apache.calcite.sql.SqlOperator operator, int inputCount, Iterable<org.apache.calcite.rex.RexNode> operands, List<String> aliases)
RelBuilder.functionScan(SqlOperator, int, Iterable)
cannot work smoothly with aliases which is why we implement a custom one.RelBuilder
queryOperation(QueryOperation queryOperation)
RelBuilder
rank(org.apache.calcite.util.ImmutableBitSet partitionKey, org.apache.calcite.rel.RelCollation orderKey, RankType rankType, RankRange rankRange, org.apache.calcite.rel.type.RelDataTypeField rankNumberType, boolean outputRankNumber)
RelBuilder
scan(ObjectIdentifier identifier, Map<String,String> dynamicOptions)
RelBuilder
transform(UnaryOperator<RelBuilder.Config> transform)
Creates a copy of this RelBuilder, with the same state as this, applying a transform to the config.RelBuilder
watermark(int rowtimeFieldIndex, org.apache.calcite.rex.RexNode watermarkExpr)
Build watermark assigner relational node.RelBuilder
windowAggregate(org.apache.flink.table.planner.plan.logical.LogicalWindow window, RelBuilder.GroupKey groupKey, List<NamedWindowProperty> namedProperties, Iterable<RelBuilder.AggCall> aggCalls)
Build window aggregate for either aggregate or table aggregate.-
Methods inherited from class org.apache.calcite.tools.RelBuilder
adoptConvention, aggregate, aggregate, aggregateCall, aggregateCall, aggregateCall, aggregateCall, aggregateCall, aggregateCall, aggregateCall, aggregateCall, aggregateCall, alias, all, and, and, antiJoin, antiJoin, arrayQuery, as, avg, avg, between, build, call, call, cast, cast, cast, clear, convert, correlate, correlate, count, count, count, count, countStar, create, currentRow, cursor, desc, distinct, dot, dot, empty, equals, exchange, exists, field, field, field, field, field, field, field, fields, fields, fields, fields, fields, fields, fields, filter, filter, filter, filter, following, functionScan, functionScan, getCluster, getRelOptSchema, getRexBuilder, getScanFactory, greaterThan, greaterThanOrEqual, groupKey, groupKey, groupKey, groupKey, groupKey, groupKey, groupKey, groupKey, groupKey, groupKey, hints, hints, in, in, in, in, intersect, intersect, isDistinctFrom, isNotDistinctFrom, isNotNull, isNull, join, join, join, join, join, lessThan, lessThanOrEqual, let, limit, literal, mapQuery, match, max, max, min, min, minus, minus, multisetQuery, not, notEquals, nullsFirst, nullsLast, or, or, patternAlter, patternAlter, patternConcat, patternConcat, patternExclude, patternField, patternPermute, patternPermute, patternQuantify, patternQuantify, peek, peek, peek, permute, pivot, preceding, project, project, project, project, project, projectExcept, projectExcept, projectNamed, projectNamed, projectPlus, projectPlus, proto, push, pushAll, rename, repeatUnion, repeatUnion, scalarQuery, scan, scan, semiJoin, semiJoin, size, snapshot, some, sort, sort, sort, sort, sortExchange, sortLimit, sortLimit, sortLimit, sum, sum, toString, transientScan, transientScan, unboundedFollowing, unboundedPreceding, uncollect, union, union, unique, unpivot, values, values, values, values, variable, with, withPredicates, withSimplifier
-
-
-
-
Field Detail
-
FLINK_REL_BUILDER_CONFIG
public static final RelBuilder.Config FLINK_REL_BUILDER_CONFIG
-
-
Method Detail
-
of
public static FlinkRelBuilder of(org.apache.calcite.plan.Context context, org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptSchema relOptSchema)
-
of
public static FlinkRelBuilder of(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelOptSchema relOptSchema)
-
proto
public static org.apache.calcite.tools.RelBuilderFactory proto(org.apache.calcite.plan.Context context)
-
pushFunctionScan
public static RelBuilder pushFunctionScan(RelBuilder relBuilder, org.apache.calcite.sql.SqlOperator operator, int inputCount, Iterable<org.apache.calcite.rex.RexNode> operands, List<String> aliases)
RelBuilder.functionScan(SqlOperator, int, Iterable)
cannot work smoothly with aliases which is why we implement a custom one. The method is static because someRelOptRule
s don't useFlinkRelBuilder
.
-
expand
public RelBuilder expand(List<List<org.apache.calcite.rex.RexNode>> projects, int expandIdIndex)
-
rank
public RelBuilder rank(org.apache.calcite.util.ImmutableBitSet partitionKey, org.apache.calcite.rel.RelCollation orderKey, RankType rankType, RankRange rankRange, org.apache.calcite.rel.type.RelDataTypeField rankNumberType, boolean outputRankNumber)
-
aggregate
public RelBuilder aggregate(RelBuilder.GroupKey groupKey, Iterable<RelBuilder.AggCall> aggCalls)
Build non-window aggregate for either aggregate or table aggregate.- Overrides:
aggregate
in classRelBuilder
-
windowAggregate
public RelBuilder windowAggregate(org.apache.flink.table.planner.plan.logical.LogicalWindow window, RelBuilder.GroupKey groupKey, List<NamedWindowProperty> namedProperties, Iterable<RelBuilder.AggCall> aggCalls)
Build window aggregate for either aggregate or table aggregate.
-
watermark
public RelBuilder watermark(int rowtimeFieldIndex, org.apache.calcite.rex.RexNode watermarkExpr)
Build watermark assigner relational node.
-
queryOperation
public RelBuilder queryOperation(QueryOperation queryOperation)
-
scan
public RelBuilder scan(ObjectIdentifier identifier, Map<String,String> dynamicOptions)
-
getTypeFactory
public org.apache.flink.table.planner.calcite.FlinkTypeFactory getTypeFactory()
Description copied from class:RelBuilder
Returns the type factory.- Overrides:
getTypeFactory
in classRelBuilder
-
transform
public RelBuilder transform(UnaryOperator<RelBuilder.Config> transform)
Description copied from class:RelBuilder
Creates a copy of this RelBuilder, with the same state as this, applying a transform to the config.- Overrides:
transform
in classRelBuilder
-
-