Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14270][SQL] whole stage codegen support for typed filter - #12061
[SPARK-14270][SQL] whole stage codegen support for typed filter#12061cloud-fan wants to merge 5 commits into
Conversation
cloud-fan
commented
Mar 30, 2016
SparkQA
commented
Mar 30, 2016
Test build #54510 has finished for PR 12061 at commit
|
There was a problem hiding this comment.
Because it involves extra deserialization step, will it get performance benefit?
There was a problem hiding this comment.
Previously we need to deserialize input row, call function and serialize to row, but now we don't need to do the final serialization, it should be faster even without whole stage codegen.
be182a9 to
c5b1fc3CompareSparkQA
commented
Mar 30, 2016
Test build #54520 has finished for PR 12061 at commit
|
There was a problem hiding this comment.
this is a risky thing because as soon as we introduce https://issues.apache.org/jira/browse/SPARK-14083 this test will be useless.
maybe we should introduce a config option now and then explicitly turn off that future optimization
cc @JoshRosen - any good names for the config option?
There was a problem hiding this comment.
Alternatively, we could have a special function wrapper which makes the code un-expression-convertable.
aa95fd6 to
bf9f5b5CompareSparkQA
commented
Mar 31, 2016
Test build #54593 has finished for PR 12061 at commit
|
SparkQA
commented
Mar 31, 2016
Test build #54600 has finished for PR 12061 at commit
|
There was a problem hiding this comment.
Detected style violation.
Suggested improvement:
override lazy val resolved: Boolean = {
// If the class to construct is an inner class, we need to get its outer pointer, or this
// expression should be regarded as unresolved.
// Note that static inner classes (e.g., inner classes within Scala objects) don't need
// outer pointer registration.
val innerStaticClass = outerPointer.isEmpty && cls.isMemberClass && !Modifier.isStatic(cls.getModifiers)
childrenResolved && !innerStaticClass
}
bf9f5b5 to
892bdd3CompareSparkQA
commented
Apr 5, 2016
Test build #54957 has finished for PR 12061 at commit
|
…bjectOperator ## What changes were proposed in this pull request? This PR decouples deserializer expression resolution from `ObjectOperator`, so that we can use deserializer expression in normal operators. This is needed by #12061 and #12067 , I abstracted the logic out and put them in this PR to reduce code change in the future. ## How was this patch tested? existing tests. Author: Wenchen Fan <wenchen@databricks.com> Closes#12131 from cloud-fan/separate.
892bdd3 to
98744f0CompareSparkQA
commented
Apr 6, 2016
Test build #55087 has finished for PR 12061 at commit
|
cloud-fan
commented
Apr 6, 2016
generated code for a single filter is: for back-to-back filters is: |
cloud-fan
commented
Apr 6, 2016
The benchmark result for master branch is: The whole stage version is about 30% faster. |
92af545 to
0fcaa06CompareSparkQA
commented
Apr 6, 2016
Test build #55109 has finished for PR 12061 at commit
|
cloud-fan
commented
Apr 6, 2016
cc @davies |
SparkQA
commented
Apr 6, 2016
Test build #55110 has finished for PR 12061 at commit
|
davies
commented
Apr 6, 2016
LGTM. |
SparkQA
commented
Apr 7, 2016
Test build #55172 has finished for PR 12061 at commit
|
cloud-fan
commented
Apr 7, 2016
cc @marmbrus , do you have time to take a look? thx! |
SparkQA
commented
Apr 7, 2016
Test build #55177 has finished for PR 12061 at commit
|
cloud-fan
commented
Apr 7, 2016
retest this please |
SparkQA
commented
Apr 7, 2016
Test build #55187 has finished for PR 12061 at commit
|
yhuai
commented
Apr 8, 2016
Thanks! Merging to master. |
What changes were proposed in this pull request?
We implement typed filter by
MapPartitions, which doesn't work well with whole stage codegen. This PR useFilterto implement typed filter and we can get the whole stage codegen support for free.This PR also introduced
DeserializeToObjectandSerializeFromObject, to seperate serialization logic from object operator, so that it's eaiser to write optimization rules for adjacent object operators.How was this patch tested?
existing tests.