Skip to content

[SPARK-52875][SQL] Simplify V2 expression translation if the input is context-independent-foldable #51569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gengliangwang
Copy link
Member

What changes were proposed in this pull request?

If the input to V2 expression translation is context-independent and foldable (see PR #51282), we perform constant folding on the input and use the evaluated result.

For example:

  • 1 + 1 becomes 2
  • a < log2(8) becomes a < 3.0

Why are the changes needed?

This change broadens the coverage of V2 expression translation.

Does this PR introduce any user-facing change?

No

How was this patch tested?

New UT

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

No

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.

1 participant