Search in sources :

Example 1 with PreJoinRepartitionNode

use of io.confluent.ksql.planner.plan.PreJoinRepartitionNode in project ksql by confluentinc.

the class LogicalPlanner method buildInternalRepartitionNode.

private PreJoinRepartitionNode buildInternalRepartitionNode(final PlanNode source, final String side, final Expression joinExpression, final BiFunction<Expression, Context<Void>, Optional<Expression>> plugin) {
    final Expression rewrittenPartitionBy = ExpressionTreeRewriter.rewriteWith(plugin, joinExpression);
    final LogicalSchema schema = buildRepartitionedSchema(source, Collections.singletonList(rewrittenPartitionBy));
    return new PreJoinRepartitionNode(new PlanNodeId(side + "SourceKeyed"), source, schema, rewrittenPartitionBy);
}
Also used : PlanNodeId(io.confluent.ksql.planner.plan.PlanNodeId) Expression(io.confluent.ksql.execution.expression.tree.Expression) WindowExpression(io.confluent.ksql.parser.tree.WindowExpression) KsqlWindowExpression(io.confluent.ksql.execution.windows.KsqlWindowExpression) SelectExpression(io.confluent.ksql.execution.plan.SelectExpression) PreJoinRepartitionNode(io.confluent.ksql.planner.plan.PreJoinRepartitionNode) LogicalSchema(io.confluent.ksql.schema.ksql.LogicalSchema)

Aggregations

Expression (io.confluent.ksql.execution.expression.tree.Expression)1 SelectExpression (io.confluent.ksql.execution.plan.SelectExpression)1 KsqlWindowExpression (io.confluent.ksql.execution.windows.KsqlWindowExpression)1 WindowExpression (io.confluent.ksql.parser.tree.WindowExpression)1 PlanNodeId (io.confluent.ksql.planner.plan.PlanNodeId)1 PreJoinRepartitionNode (io.confluent.ksql.planner.plan.PreJoinRepartitionNode)1 LogicalSchema (io.confluent.ksql.schema.ksql.LogicalSchema)1