Skip to content
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

[SPARK-44549][SQL] Support window functions in correlated scalar subqueries #42383

Closed
wants to merge 15 commits into from

Conversation

agubichev
Copy link
Contributor

What changes were proposed in this pull request?

Support window functions in correlated scalar subqueries.
Support in IN/EXISTS subqueries will come after we migrate them into DecorrelateInnerQuery framework. In addition, correlation is not yet supported inside the window function itself.

Why are the changes needed?

Supports more subqueries.

Does this PR introduce any user-facing change?

Yes, users can run more subqueries now.

How was this patch tested?

Unit and query tests. The results of query tests were checked against Postgresql.

@github-actions github-actions bot added the SQL label Aug 7, 2023
@HyukjinKwon HyukjinKwon changed the title [SPARK-44549] Support window functions in correlated scalar subqueries [SPARK-44549][SQL] Support window functions in correlated scalar subqueries Aug 9, 2023
Copy link
Contributor

@jchen5 jchen5 left a comment

Choose a reason for hiding this comment

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

Can we also add test cases for window functions with:

  • in EXISTS
  • non-equality correlation cond
  • aggregate

@agubichev
Copy link
Contributor Author

Can we also add test cases for window functions with:

  • in EXISTS
  • non-equality correlation cond
  • aggregate

added more tests

Copy link
Contributor

@jchen5 jchen5 left a comment

Choose a reason for hiding this comment

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

Looks good! CC @allisonwang-db @cloud-fan for review as well

@cloud-fan
Copy link
Contributor

thanks, merging to master!

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.

4 participants