Skip to content

[SPARK-49488][SQL][FOLLOWUP] Do not push down extract expression if extracted field is second #50637

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

Closed
wants to merge 2 commits into from

Conversation

beliefer
Copy link
Contributor

@beliefer beliefer commented Apr 18, 2025

What changes were proposed in this pull request?

This PR aims to forbid the pushdown while extract second from date or interval.

Why are the changes needed?

Currently, Spark supports extract second from date or interval and it returns result with decimal(8, 6).
But extract second from date or interval returns integer in MySQL.
So we should forbid the pushdown.

Does this PR introduce any user-facing change?

'No'.

How was this patch tested?

GA.

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

No.

@github-actions github-actions bot added the SQL label Apr 18, 2025
@beliefer
Copy link
Contributor Author

ping @cloud-fan

@cloud-fan
Copy link
Contributor

thanks, merging to master/4.0!

@cloud-fan cloud-fan closed this in c77b163 Apr 22, 2025
cloud-fan pushed a commit that referenced this pull request Apr 22, 2025
…xtracted field is second

### What changes were proposed in this pull request?
This PR aims to forbid the pushdown while extract `second` from date or interval.

### Why are the changes needed?
Currently, Spark supports extract second from date or interval and it returns result with `decimal(8, 6)`.
But extract second from date or interval returns integer in MySQL.
So we should forbid the pushdown.

### Does this PR introduce _any_ user-facing change?
'No'.

### How was this patch tested?
GA.

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

Closes #50637 from beliefer/SPARK-49488_f2.

Authored-by: beliefer <beliefer@163.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit c77b163)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@beliefer
Copy link
Contributor Author

@cloud-fan Thank you!

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.

2 participants