Search in sources :

Example 1 with FlinkLogicalLegacySink

use of org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalLegacySink in project flink by apache.

the class RelTimeIndicatorConverter method visitSink.

private RelNode visitSink(SingleRel sink) {
    Preconditions.checkArgument(sink instanceof FlinkLogicalLegacySink || sink instanceof FlinkLogicalSink);
    RelNode newInput = sink.getInput().accept(this);
    newInput = materializeProcTime(newInput);
    return sink.copy(sink.getTraitSet(), Collections.singletonList(newInput));
}
Also used : RelNode(org.apache.calcite.rel.RelNode) FlinkLogicalLegacySink(org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalLegacySink) FlinkLogicalSink(org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalSink)

Example 2 with FlinkLogicalLegacySink

use of org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalLegacySink in project flink by apache.

the class RelTimeIndicatorConverter method convert.

public static RelNode convert(RelNode rootRel, RexBuilder rexBuilder, boolean needFinalTimeIndicatorConversion) {
    RelTimeIndicatorConverter converter = new RelTimeIndicatorConverter(rexBuilder);
    RelNode convertedRoot = rootRel.accept(converter);
    // FlinkLogicalLegacySink and FlinkLogicalSink are already converted
    if (rootRel instanceof FlinkLogicalLegacySink || rootRel instanceof FlinkLogicalSink || !needFinalTimeIndicatorConversion) {
        return convertedRoot;
    }
    // materialize remaining procTime indicators
    return converter.materializeProcTime(convertedRoot);
}
Also used : RelNode(org.apache.calcite.rel.RelNode) FlinkLogicalLegacySink(org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalLegacySink) FlinkLogicalSink(org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalSink)

Aggregations

RelNode (org.apache.calcite.rel.RelNode)2 FlinkLogicalLegacySink (org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalLegacySink)2 FlinkLogicalSink (org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalSink)2