Uh oh!
There was an error while loading. Please reload this page.
[SPARK-13996][SQL] Add more not null attributes for Filter codegen - #11810
[SPARK-13996][SQL] Add more not null attributes for Filter codegen#11810viirya wants to merge 6 commits into
Conversation
SparkQA
commented
Mar 18, 2016
Test build #53498 has finished for PR 11810 at commit
|
SparkQA
commented
Mar 18, 2016
Test build #53511 has finished for PR 11810 at commit
|
SparkQA
commented
Mar 18, 2016
Test build #53523 has finished for PR 11810 at commit
|
… attributes from conditions.
| // The columns that will filtered out by `IsNotNull` could be considered as not nullable. | ||
| private val notNullAttributes = notNullPreds.flatMap(_.references) | ||
| private val notNullAttributes = notNullPreds.flatMap(_.references).distinct.map(_.exprId) |
There was a problem hiding this comment.
The attributes from conditions can have different qualifiers than child.output, which makes later indexOf call failed. So here use exprId instead.
SparkQA
commented
Mar 19, 2016
Test build #53592 has finished for PR 11810 at commit
|
viirya
commented
Mar 21, 2016
cc @davies |
viirya
commented
Mar 23, 2016
ping @davies Please take a look at this to see if it is good for you. Thanks. |
| // Split out all the IsNotNulls from condition. | ||
| private val (notNullPreds, otherPreds) = splitConjunctivePredicates(condition).partition { | ||
| case IsNotNull(a) if child.output.contains(a) => true | ||
| case IsNotNull(a) if a.references.subsetOf(child.outputSet) => true |
There was a problem hiding this comment.
This is not correct, for example, IsNotNull(IsNull(a)) does not means a can not be null.
There was a problem hiding this comment.
ah, you are right. With the NullIntolerant trait introduced in #11809, we can solve this easily. Wait for that PR to be ready then we can re-visit this. Thanks!
…-attrs Conflicts: sql/core/src/main/scala/org/apache/spark/sql/execution/basicOperators.scala
SparkQA
commented
Apr 2, 2016
Test build #54767 has finished for PR 11810 at commit
|
viirya
commented
Apr 2, 2016
retest this please. |
SparkQA
commented
Apr 2, 2016
Test build #54771 has finished for PR 11810 at commit
|
viirya
commented
Apr 2, 2016
retest this please. |
viirya
commented
Apr 2, 2016
Looks like |
SparkQA
commented
Apr 2, 2016
Test build #54774 has finished for PR 11810 at commit
|
viirya
commented
Apr 2, 2016
retest this please. |
SparkQA
commented
Apr 3, 2016
Test build #54786 has finished for PR 11810 at commit
|
davies
commented
Apr 3, 2016
LGTM |
davies
commented
Apr 3, 2016
Merging this into master, thanks! |
viirya
commented
Apr 3, 2016
Thanks for reviewing this. |
What changes were proposed in this pull request?
JIRA: https://issues.apache.org/jira/browse/SPARK-13996
Filter codegen finds the attributes not null by checking IsNotNull(a) expression with a condition if child.output.contains(a). However, the current approach to checking it is not comprehensive. We can improve it.
E.g., for this plan:
The code snippet generated without this patch:
With this patch:
How was this patch tested?
Existing tests.