Skip to content

Conversation

@olaky
Copy link
Contributor

@olaky olaky commented Jun 9, 2022

What changes were proposed in this pull request?

Apply the optimizer rule ComputeCurrentTime consistently across subqueries.

This is a backport of #36654 with adjustements:

  • The rule does not use pruning
  • The transformWithSubqueries function was also backported

Why are the changes needed?

At the moment timestamp functions like now() can return different values within a query if subqueries are involved

Does this PR introduce any user-facing change?

No

How was this patch tested?

A new unit test was added

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@MaxGekk
Copy link
Member

MaxGekk commented Jun 12, 2022

+1, LGTM. Merging to 3.1.
Thank you, @olaky.

MaxGekk pushed a commit that referenced this pull request Jun 12, 2022
### What changes were proposed in this pull request?

Apply the optimizer rule ComputeCurrentTime consistently across subqueries.

This is a backport of #36654 with adjustements:
* The rule does not use pruning
* The transformWithSubqueries function was also backported

### Why are the changes needed?

At the moment timestamp functions like now() can return different values within a query if subqueries are involved

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

A new unit test was added

Closes #36818 from olaky/SPARK-39259-spark_3_1.

Authored-by: Ole Sasse <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
@MaxGekk MaxGekk closed this Jun 12, 2022
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