liujiayi771 opened a new pull request, #12049:
URL: https://github.com/apache/gluten/pull/12049
## Summary
When AQE re-runs columnar rules across stages, `GlutenFallbackReporter`
repeatedly calls `FallbackTags.add` on the same shared `logicalLink` with the
same reason. The previous merge logic in `FallbackTags.add` unconditionally
concatenated the two `Appendable` reasons, producing strings like `"r; r; r;
..."` that grow with every AQE iteration — especially noticeable when users
manually fall back specific node types and the same fixed reason is added many
times.
The relevant comment at `GlutenFallbackReporter.scala:66-71` already
explains the trigger:
> With in next round stage in AQE, the physical plan would be a new instance
that can not preserve the tag, so we need to set the fallback reason to logical
plan ... If a logical plan mapping to several physical plan, we add all reason
into that logical plan to make sure we do not lose any fallback reason.
This PR skips the concat when one reason already contains the other, so
repeated tagging with the same (or a subset) reason no longer grows the string.
- Keep `l` when `l.reason == r.reason` or `l.reason` already contains
`r.reason`
- Replace with `r` when `r.reason` contains `l.reason` (use the
longer/superset reason)
- Otherwise concatenate as before
## Test plan
- [x] Added `FallbackTagSuite` in `gluten-core` covering:
- repeated `add` of the same reason does not grow the reason string
- distinct `Appendable` reasons are still concatenated (regression guard)
- [x] Verified the dedup test fails on the original code and passes after
the fix; the concat test passes in both versions
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]