Skip to content

Minor: Use standard tree walk in Projection Pushdown - #8787

Merged
Dandandan merged 1 commit into
apache:mainfrom
alamb:alamb/simplify_expr_analysis
Jan 9, 2024
Merged

Minor: Use standard tree walk in Projection Pushdown#8787
Dandandan merged 1 commit into
apache:mainfrom
alamb:alamb/simplify_expr_analysis

Conversation

@alamb

@alambalamb commented Jan 8, 2024

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Follow on to #8774 / #8735

Rationale for this change

The core issue in #8735 was that one Expr type was forgotten. @haohuaijin restored the extra Expr type ❤️

However, I think there is still some danger than a new Expr type would be added and forgotten to be added to this area. Thus I propose using the standard TreeVisitor to do the recursion

What changes are included in this PR?

Use inspect_expr_pre instead of manual recursion

Are these changes tested?

Covered by existing tests

Are there any user-facing changes?

No

@alambalamb changed the title Alamb/simplify expr analysisMinor: Use standard tree walk in Projection PushdownJan 8, 2024
@github-actionsgithub-actionsBot added the optimizer Optimizer rules label Jan 8, 2024
@alamb
alambforce-pushed the alamb/simplify_expr_analysis branch from 1bd4684 to dce26feCompareJanuary 8, 2024 14:46

@haohuaijinhaohuaijin 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.

Thank you @alamb for this great simplify 👍.

@Dandandan
Dandandan merged commit f5ca078 into apache:mainJan 9, 2024
@alamb
alamb deleted the alamb/simplify_expr_analysis branch January 9, 2024 18:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimizerOptimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@alamb@Dandandan@haohuaijin