Copilot commented on code in PR #2415:
URL: https://github.com/apache/auron/pull/2415#discussion_r3627541536
##########
auron-flink-extension/auron-flink-planner/src/main/java/org/apache/auron/flink/table/planner/processor/AuronOperatorFusionProcessor.java:
##########
@@ -197,7 +197,12 @@ void tryFuse(
Map<Integer, Integer> consumerCount,
Function<StreamExecTableSourceScan, DynamicTableSource>
sourceResolver,
ReadableConfig tableConfig) {
- // Sole-consumer gate: multi-consumer fusion is out of scope (tracked
separately).
+ // Sole-consumer gate: a source feeding more than one consumer is
deliberately not fused.
+ // The native source runtime is single-plan / single-output — one
source runs exactly one
+ // PhysicalPlanNode and emits one stream, so N distinct per-consumer
Calc plans cannot share
+ // a single source. Declining loses nothing structurally: each
consumer instead runs as a
+ // standalone native Calc over the source's shared row stream, copying
every column out of
+ // the shared columnar RowData view, so the fan-out is safe.
Review Comment:
This comment claims that declining fusion for multi-consumer sources is safe
because each consumer runs a standalone *native* Calc that copies every column
out of the shared columnar RowData view. However, in this method (and per the
tryFuse Javadoc), the unfused Calc may also run as Flink codegen when it is not
convertible to native (or when the shadowed StreamExecCalc is not present). The
comment should avoid asserting native-copy semantics unconditionally and
instead phrase the safety argument conditionally for the native path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]