Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19827#discussion_r153251857
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeProjection.scala
---
@@ -49,25 +49,18 @@ object GenerateUnsafeProjection extends
CodeGenerator[Seq[Expression], UnsafePro
input: String,
fieldTypes: Seq[DataType],
bufferHolder: String): String = {
+ // Puts `input` in a local variable to avoid to re-evaluate it if it's
a statement.
+ val tmpInput = ctx.freshName("tmpInput")
--- End diff --
this change seems not related to the main goal of this PR, isn't it? what
about creating a new PR for this change?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]