-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-7184] [SQL] enable codegen by default #6726
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
|
Test build #34518 has finished for PR 6726 at commit
|
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.
can we call a function here? define some BinaryUtils to put everything for binary there. That makes it much easier to change.
Code generated version can just generate the code to call that function.
|
Test build #34544 has finished for PR 6726 at commit
|
|
Test build #34545 has finished for PR 6726 at commit
|
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.
we should remove the case here, i.e.
case IntegerType | BooleanType | LongType | DoubleType | FloatType | ShortType | ByteType
| DateType =>
(eval1, eval2) => s"$eval1 == $eval2"
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.
also remove the case for other cases.
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.
so code gen is completely off if I use any thread safe == false function?
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.
Yes.
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.
We can improve the coverage later, make all the hive tests passed first.
|
Test build #34574 has finished for PR 6726 at commit
|
|
Test build #34566 has finished for PR 6726 at commit
|
…codegen Conflicts: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
|
Test build #34623 has finished for PR 6726 at commit
|
Conflicts: sql/catalyst/src/main/scala/org/apache/spark/sql/BaseRow.java sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateProjection.scala sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateUtilsSuite.scala
|
Test build #34727 has finished for PR 6726 at commit
|
Conflicts: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullFunctions.scala sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala sql/core/src/main/scala/org/apache/spark/sql/execution/expressions/MonotonicallyIncreasingID.scala sql/core/src/main/scala/org/apache/spark/sql/sources/commands.scala sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala
|
Test build #34844 has finished for PR 6726 at commit
|
Conflicts: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullFunctions.scala
|
Test build #34859 has finished for PR 6726 at commit
|
|
Test build #34865 has finished for PR 6726 at commit
|
|
Test build #34877 has finished for PR 6726 at commit
|
|
Going to merge this one. |
In order to have better performance out of box, this PR turn on codegen by default, then codegen can be tested by sql/test and hive/test. This PR also fix some corner cases for codegen. Before 1.5 release, we should re-visit this, turn it off if it's not stable or causing regressions. cc rxin JoshRosen Author: Davies Liu <[email protected]> Closes apache#6726 from davies/enable_codegen and squashes the following commits: f3b25a5 [Davies Liu] fix warning 73750ea [Davies Liu] fix long overflow when compare 3017a47 [Davies Liu] Merge branch 'master' of github.com:apache/spark into enable_codegen a7d75da [Davies Liu] Merge branch 'master' of github.com:apache/spark into enable_codegen ff5b75a [Davies Liu] Merge branch 'master' of github.com:apache/spark into enable_codegen f4cf2c2 [Davies Liu] fix style 99fc139 [Davies Liu] Merge branch 'enable_codegen' of github.com:davies/spark into enable_codegen 91fc7a2 [Davies Liu] disable codegen for ScalaUDF 207e339 [Davies Liu] Update CodeGenerator.scala 44573a3 [Davies Liu] check thread safety of expression f3886fa [Davies Liu] don't inline primitiveTerm for null literal c8e7cd2 [Davies Liu] address comment a8618c9 [Davies Liu] enable codegen by default
In order to have better performance out of box, this PR turn on codegen by default, then codegen can be tested by sql/test and hive/test.
This PR also fix some corner cases for codegen.
Before 1.5 release, we should re-visit this, turn it off if it's not stable or causing regressions.
cc @rxin @JoshRosen