Skip to content

[CORE] Get correct fallback reason on nodes without logicalLink#11295

Merged
liujiayi771 merged 1 commit intoapache:mainfrom
liujiayi771:sort_fallback
Dec 16, 2025
Merged

[CORE] Get correct fallback reason on nodes without logicalLink#11295
liujiayi771 merged 1 commit intoapache:mainfrom
liujiayi771:sort_fallback

Conversation

@liujiayi771
Copy link
Copy Markdown
Contributor

@liujiayi771 liujiayi771 commented Dec 14, 2025

What changes are proposed in this pull request?

This PR adds a fallback mechanism to attempt retrieving the fallback reason from a SparkPlan node's tags when its logicalLink is unavailable. Some SparkPlan nodes, such as the SortExec generated by Spark's EnsureRequirements rule, inherently lack a logicalLink. Furthermore, some plan conversion rules in Gluten might omit calling copyTagsFrom, leading to the loss of the original logicalLink.

In such cases, if the node falls back, the fallback reason might be stored within the physical node's tags. This change attempts to retrieve the reason from there as a best-effort approach.

How was this patch tested?

Add a test case when window sort fallback. Before this change, the fallback reason was a generic "Gluten does not touch it or does not support it". After the change, it can display a more precise reason, such as "[FallbackByUserOptions] Validation failed on node Sort", which is retrieved from the physical node's tags.

@github-actions github-actions Bot added CORE works for Gluten Core VELOX labels Dec 14, 2025
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@liujiayi771
Copy link
Copy Markdown
Contributor Author

Before:
iShot_2025-12-14_18 34 39

After:
iShot_2025-12-14_18 06 29

@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@liujiayi771
Copy link
Copy Markdown
Contributor Author

liujiayi771 commented Dec 15, 2025

cc @zhztheplayer @ulysses-you

@liujiayi771 liujiayi771 merged commit cf62a41 into apache:main Dec 16, 2025
194 of 203 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants