Skip to content

[GLUTEN-11635][FOLLOW-UP] Respect partial fallback configs when checking node support#11988

Merged
philo-he merged 2 commits into
apache:mainfrom
wecharyu:GLUTEN-11635-follow-up
Apr 30, 2026
Merged

[GLUTEN-11635][FOLLOW-UP] Respect partial fallback configs when checking node support#11988
philo-he merged 2 commits into
apache:mainfrom
wecharyu:GLUTEN-11635-follow-up

Conversation

@wecharyu

@wecharyu wecharyu commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Minor follow up for #11637.

How was this patch tested?

Add UT.

Was this patch authored or co-authored using generative AI tooling?

No.

Related issue: #11635

@github-actions github-actions Bot added the VELOX label Apr 26, 2026

@zml1206 zml1206 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@philo-he philo-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment. Please check if it makes sense. Thank you.

plan.isInstanceOf[ProjectExec] ||
plan.isInstanceOf[GenerateExec]
def supportPartialFallback(plan: SparkPlan): Boolean = plan match {
case _: ProjectExec => GlutenConfig.get.enableColumnarPartialProject

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the following code already performs this check before PartialFallback.supportPartialFallback is called. Is this a duplicate?

if (!GlutenConfig.get.enableColumnarPartialProject) {

@zml1206 zml1206 Apr 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is to handle situations where the parent and child are different; one is ProjectExec, and the other is GenerateExec.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the check for config. Am I missing something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule-level check only controls whether that specific rule runs. supportPartialFallback is used when checking whether a parent SparkPlan can be used as a partial-fallback boundary by another rule.

In nested cases, PartialGenerateRule may inspect a ProjectExec parent, and PartialProjectRule may inspect a GenerateExec parent. Without checking the corresponding config in supportPartialFallback, a disabled partial fallback type can still be considered a supported boundary indirectly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. It's cross referenced. Thanks.

plan.isInstanceOf[GenerateExec]
def supportPartialFallback(plan: SparkPlan): Boolean = plan match {
case _: ProjectExec => GlutenConfig.get.enableColumnarPartialProject
case _: GenerateExec => GlutenConfig.get.enableColumnarPartialGenerate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

executedPlan.exists(_.isInstanceOf[ColumnarPartialProjectExec]) ==
enablePartialProject)
assert(
executedPlan.exists(_.isInstanceOf[ColumnarPartialGenerateExec]) ==

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also test the case that ENABLE_COLUMNAR_PARTIAL_GENERATE is disabled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@philo-he philo-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@philo-he
philo-he merged commit b1906e5 into apache:main Apr 30, 2026
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants