[SPARK-16644][SQL] Aggregate should not propagate constraints containing aggregate expressions#14281
Closed
cloud-fan wants to merge 2 commits into
Closed
[SPARK-16644][SQL] Aggregate should not propagate constraints containing aggregate expressions#14281cloud-fan wants to merge 2 commits into
cloud-fan wants to merge 2 commits into
Conversation
Contributor
Author
|
Test build #62589 has finished for PR 14281 at commit
|
| } | ||
| } | ||
|
|
||
| test("Aggregate should not propagate constraints containing aggregate expressions") { |
Contributor
There was a problem hiding this comment.
put a jira number, and see if we can move this into constraint suite?
Member
There was a problem hiding this comment.
Nice find. I agree, it'd be good to put this in ConstraintPropagationSuite and explicitly check for the inferred constraints.
|
|
||
| val aliasedRelation = tr.where('c.attr > 10 && 'a.attr < 5) | ||
| .groupBy('a, 'c, 'b)('a, 'c.as("c1"), count('a).as("a3")).select('c1, 'a).analyze | ||
| .groupBy('a, 'c, 'b)('a, 'c.as("c1"), count('a).as("a3")).select('c1, 'a, 'a3).analyze |
Member
|
LGTM |
|
Test build #62634 has finished for PR 14281 at commit
|
Contributor
|
Thanks. I am merging this to master and branch 2.0. |
asfgit
pushed a commit
that referenced
this pull request
Jul 21, 2016
…ing aggregate expressions aggregate expressions can only be executed inside `Aggregate`, if we propagate it up with constraints, the parent operator can not execute it and will fail at runtime. new test in SQLQuerySuite Author: Wenchen Fan <wenchen@databricks.com> Author: Yin Huai <yhuai@databricks.com> Closes #14281 from cloud-fan/bug. (cherry picked from commit cfa5ae8) Signed-off-by: Yin Huai <yhuai@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
aggregate expressions can only be executed inside
Aggregate, if we propagate it up with constraints, the parent operator can not execute it and will fail at runtime.How was this patch tested?
new test in SQLQuerySuite