Uh oh!
There was an error while loading. Please reload this page.
[SPARK-12957][SQL] Initial support for constraint propagation in SparkSQL - #10844
[SPARK-12957][SQL] Initial support for constraint propagation in SparkSQL#10844sameeragarwal wants to merge 15 commits into
Conversation
SparkQA
commented
Jan 20, 2016
Test build #49770 has finished for PR 10844 at commit
|
f7251dd to
04ff99aCompareSparkQA
commented
Jan 20, 2016
Test build #49775 has finished for PR 10844 at commit
|
hvanhovell
commented
Jan 20, 2016
Could you add the id of the JIRA ticket to the titlle? Could you also add a description, explaining why we want this? Seems cool though! |
sameeragarwal
commented
Jan 22, 2016
@hvanhovell added, thanks! |
gatorsmile
commented
Jan 22, 2016
@sameeragarwal I just saw it. Thank you! I will do the code changes after this is merged. |
SparkQA
commented
Jan 26, 2016
Test build #50083 has finished for PR 10844 at commit
|
SparkQA
commented
Jan 27, 2016
Test build #50161 has finished for PR 10844 at commit
|
There was a problem hiding this comment.
protected?
Also I'm not sure I get the scala doc. Maybe getReleventContraints is a better name? It is taking the constraints and removing those that don't apply anymore because we removed columns right?
SparkQA
commented
Jan 29, 2016
Test build #50371 has finished for PR 10844 at commit
|
sameeragarwal
commented
Jan 29, 2016
Thanks @marmbrus, all comments addressed! |
SparkQA
commented
Jan 29, 2016
Test build #50404 has finished for PR 10844 at commit
|
sameeragarwal
commented
Jan 29, 2016
test this please |
There was a problem hiding this comment.
I would consider making this getRelevantConstraints(validConstraints) so that each implementor of validContraints does't have to remember to do the filter / canonicalization. They can just focus on augmenting or passing through constraints from children based on the operators semantics.
SparkQA
commented
Jan 30, 2016
Test build #50417 has finished for PR 10844 at commit
|
sameeragarwal
commented
Jan 30, 2016
Thanks @marmbrus, all comments addressed! |
SparkQA
commented
Jan 30, 2016
Test build #50429 has finished for PR 10844 at commit
|
There was a problem hiding this comment.
I think this was a merging mistake as its duplicated with the method below.
sameeragarwal
commented
Feb 2, 2016
@marmbrus comments addressed! |
sameeragarwal
commented
Feb 2, 2016
test this please |
SparkQA
commented
Feb 2, 2016
Test build #50518 has finished for PR 10844 at commit
|
There was a problem hiding this comment.
Looks like we do not need PredicateHelper at here? Maybe it is better to just with PredicateHelper for Filter and Join?
There was a problem hiding this comment.
Sounds good, added this only for filter and join that needed splitConjunctivePredicates
c1a0128 to
2bd2735Comparesameeragarwal
commented
Feb 2, 2016
comments addressed! |
SparkQA
commented
Feb 3, 2016
Test build #50603 has finished for PR 10844 at commit
|
marmbrus
commented
Feb 3, 2016
Thanks! Merging to master. |
Based on the semantics of a query, we can derive a number of data constraints on output of each (logical or physical) operator. For instance, if a filter defines
‘a > 10, we know that the output data of this filter satisfies 2 constraints:‘a > 10isNotNull(‘a)This PR proposes a possible way of keeping track of these constraints and propagating them in the logical plan, which can then help us build more advanced optimizations (such as pruning redundant filters, optimizing joins, among others). We define constraints as a set of (implicitly conjunctive) expressions. For e.g., if a filter operator has constraints =
Set(‘a > 10, ‘b < 100), it’s implied that the outputs satisfy both individual constraints (i.e.,‘a > 10AND‘b < 100).Design Document: https://docs.google.com/a/databricks.com/document/d/1WQRgDurUBV9Y6CWOBS75PQIqJwT-6WftVa18xzm7nCo/edit?usp=sharing