-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34012][SQL] Keep behavior consistent when conf spark.sql.legacy.parser.havingWithoutGroupByAsWhere is true with migration guide
#31039
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
Conversation
|
FYI @maropu @cloud-fan @viirya |
|
Kubernetes integration test starting |
| if (conf.getConf(SQLConf.LEGACY_HAVING_WITHOUT_GROUP_BY_AS_WHERE)) { | ||
| // If the legacy conf is set, treat HAVING without GROUP BY as WHERE. | ||
| withHavingClause(havingClause, createProject()) | ||
| withHavingClauseAsWhere(havingClause, createProject()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you inline this func here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you inline this func here?
DONE
|
Could you file a new jira for this issue? |
spark.sql.legacy.parser.havingWithoutGroupByAsWhere is true with migration guide
DONE |
|
Kubernetes integration test status failure |
cloud-fan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! Which version did we break this legacy config?
|
Kubernetes integration test starting |
SInce #28294 backport to 2.4 too(#28294 (comment)), impacted version. should be 2.4/3.0/3.1/3.2 |
|
Kubernetes integration test status success |
|
Test build #133673 has finished for PR 31039 at commit
|
|
Test build #133682 has finished for PR 31039 at commit
|
…cy.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. ### 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 #31039 from AngersZhuuuu/SPARK-25780-Follow-up. Authored-by: angerszhu <[email protected]> Signed-off-by: Takeshi Yamamuro <[email protected]> (cherry picked from commit e279ed3) Signed-off-by: Takeshi Yamamuro <[email protected]>
|
GA passed, so merged to master/branch-3.1. Could you make PRs for backporting this fix into branch-3.0/2.4? Thanks! |
…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 #31050 from AngersZhuuuu/SPARK-34012-2.4. Authored-by: angerszhu <[email protected]> Signed-off-by: Takeshi Yamamuro <[email protected]>
…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 <[email protected]> Signed-off-by: Takeshi Yamamuro <[email protected]>
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
UnresolvedHavingto insteadFilterto solve such problem, but break origin logical about treatSELECT 1 FROM range(10) HAVING trueasSELECT 1 FROM range(10) WHERE true.This PR fix this issue and add UT.
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