viirya commented on a change in pull request #25827: [SPARK-29128][SQL] Split
predicate code in OR expressions
URL: https://github.com/apache/spark/pull/25827#discussion_r325486404
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
##########
@@ -156,6 +156,12 @@ abstract class Expression extends TreeNode[Expression] {
private def reduceCodeSize(ctx: CodegenContext, eval: ExprCode): Unit = {
// TODO: support whole stage codegen too
+ //
+ // NOTE: We could use `CodeGenerator.defineIndependentFunction` here for
the code path
+ // of the whole stage codegen. But, we don't do so now because the
performance changes that
+ // we don't expect might occur in many queries. Therefore, we currently
apply
+ // this split function to specific performance-sensitive places only,
+ // e.g., common subexpression elimination for the whole stage codegen and
OR expressions.
Review comment:
I recall that is because string-based manipulation was thought too buggy? I
didn't remember it is because of performance issue.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]