weiqingy commented on code in PR #2415:
URL: https://github.com/apache/auron/pull/2415#discussion_r3627596728
##########
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:
Good catch. The unfused Calc can indeed run as Flink codegen.
StreamExecCalc.translateToPlanInternal falls back to super when the Calc does
not convert to native, so asserting native-copy semantics unconditionally was
wrong. Reworded to make the structural point the gate actually protects: no
per-consumer plan is staged onto the shared source, so there is no
last-write-wins between consumers, whether each consumer ends up native or
codegen. Fixed in f525cc00.
--
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]