cloud-fan commented on a change in pull request #32980:
URL: https://github.com/apache/spark/pull/32980#discussion_r660694807
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
##########
@@ -1071,14 +1133,13 @@ class CodegenContext extends Logging {
(inputVars.toSeq, exprCodes.toSeq)
}.unzip
- val splitThreshold = SQLConf.get.methodSplitThreshold
-
- val (codes, subExprsMap, exprCodes) = if
(nonSplitExprCode.map(_.length).sum > splitThreshold) {
+ val needSplit = nonSplitCode.map(_.eval.code.length).sum >
SQLConf.get.methodSplitThreshold
+ val (subExprsMap, exprCodes) = if (needSplit) {
Review comment:
Not related to this PR: so here we repeat the logic of generating
`SubExprEliminationState`s with splitting the code? `nonSplitCode` is totally
wasted?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]