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-34012][SQL][3.0] Keep behavior consistent when conf spark.sqllegacy.parser.havingWithoutGroupByAsWhere is true with migration guide #31049

Closed
wants to merge 1 commit into from

Conversation

AngersZhuuuu
Copy link
Contributor

@AngersZhuuuu AngersZhuuuu commented Jan 6, 2021

What changes were proposed in this pull request?

In #22696 we support HAVING without GROUP BY means global aggregate
But since we treat having as Filter before, in this way will cause a lot of analyze error, after #28294 we use UnresolvedHaving to instead Filter to solve such problem, but break origin logical about treat SELECT 1 FROM range(10) HAVING true as SELECT 1 FROM range(10) WHERE true .
This PR fix this issue and add UT.

NOTE: This backport comes from #31039

Why are the changes needed?

Keep consistent behavior of migration guide.

Does this PR introduce any user-facing change?

No

How was this patch tested?

added UT

….legacy.parser.havingWithoutGroupByAsWhere` is true with migration guide
@AngersZhuuuu
Copy link
Contributor Author

FYI @maropu @cloud-fan

@maropu
Copy link
Member

maropu commented Jan 6, 2021

Looks fine if the tests pass.

@SparkQA
Copy link

SparkQA commented Jan 6, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38290/

@SparkQA
Copy link

SparkQA commented Jan 6, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38290/

@SparkQA
Copy link

SparkQA commented Jan 6, 2021

Test build #133702 has finished for PR 31049 at commit 0a0f1b9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

maropu pushed a commit that referenced this pull request Jan 6, 2021
…legacy.parser.havingWithoutGroupByAsWhere` is true with migration guide

### What changes were proposed in this pull request?
In #22696 we support HAVING without GROUP BY means global aggregate
But since we treat having as Filter before, in this way will cause a lot of analyze error, after #28294 we use `UnresolvedHaving` to instead `Filter` to solve such problem, but break origin logical about treat `SELECT 1 FROM range(10) HAVING true` as `SELECT 1 FROM range(10) WHERE true`   .
This PR fix this issue and add UT.

NOTE: This backport comes from #31039

### Why are the changes needed?
Keep consistent behavior of migration guide.

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

### How was this patch tested?
added UT

Closes #31049 from AngersZhuuuu/SPARK-34012-3.0.

Authored-by: angerszhu <angers.zhu@gmail.com>
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
@maropu
Copy link
Member

maropu commented Jan 6, 2021

Thanks! Merged to branch-3.0.

@maropu maropu closed this Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants