You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "liujiayi771 (via GitHub)" <gi...@apache.org> on 2026/05/07 04:52:35 UTC
[PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "liujiayi771 (via GitHub)" <gi...@apache.org>.
liujiayi771 commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4394251263
before:
<img width="747" height="77" alt="image" src="https://github.com/user-attachments/assets/ad8748a2-f08d-4f74-8675-a9f7c7041bac" />
after:
<img width="746" height="57" alt="image" src="https://github.com/user-attachments/assets/af04841e-cf25-4775-8319-2e560e304ed7" />
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4394243618
Run Gluten Clickhouse CI on x86
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4394650241
Run Gluten Clickhouse CI on x86
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4395180023
Run Gluten Clickhouse CI on x86
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "liujiayi771 (via GitHub)" <gi...@apache.org>.
liujiayi771 commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4417133417
@zhztheplayer Good idea, using a hash set is cleaner and more precise. Updated, thanks!
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "liujiayi771 (via GitHub)" <gi...@apache.org>.
liujiayi771 commented on code in PR #12049:
URL: https://github.com/apache/gluten/pull/12049#discussion_r3216056138
##########
gluten-core/src/main/scala/org/apache/gluten/extension/columnar/FallbackTag.scala:
##########
@@ -93,7 +93,13 @@ object FallbackTags {
case (exclusive: FallbackTag.Exclusive, _) =>
exclusive
case (l: FallbackTag.Appendable, r: FallbackTag.Appendable) =>
- FallbackTag.Appendable(s"${l.reason}; ${r.reason}")
+ if (l.reason == r.reason || l.reason.contains(r.reason)) {
+ l
+ } else if (r.reason.contains(l.reason)) {
+ r
+ } else {
+ FallbackTag.Appendable(s"${l.reason}; ${r.reason}")
+ }
Review Comment:
@zhztheplayer Good idea, using a hash set is cleaner and more precise. Updated, thanks!
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4412219136
Run Gluten Clickhouse CI on x86
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "zhztheplayer (via GitHub)" <gi...@apache.org>.
zhztheplayer commented on code in PR #12049:
URL: https://github.com/apache/gluten/pull/12049#discussion_r3207767959
##########
gluten-core/src/main/scala/org/apache/gluten/extension/columnar/FallbackTag.scala:
##########
@@ -93,7 +93,13 @@ object FallbackTags {
case (exclusive: FallbackTag.Exclusive, _) =>
exclusive
case (l: FallbackTag.Appendable, r: FallbackTag.Appendable) =>
- FallbackTag.Appendable(s"${l.reason}; ${r.reason}")
+ if (l.reason == r.reason || l.reason.contains(r.reason)) {
+ l
+ } else if (r.reason.contains(l.reason)) {
+ r
+ } else {
+ FallbackTag.Appendable(s"${l.reason}; ${r.reason}")
+ }
Review Comment:
How about storing a hash set in `FallbackTag.Appendable`? Could be faster and preciser.
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12049:
URL: https://github.com/apache/gluten/pull/12049#issuecomment-4397921498
Run Gluten Clickhouse CI on x86
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [CORE] Deduplicate fallback reason when merging Appendable tags [gluten]
Posted by "liujiayi771 (via GitHub)" <gi...@apache.org>.
liujiayi771 merged PR #12049:
URL: https://github.com/apache/gluten/pull/12049
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org