Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20036#discussion_r158753678
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
---
@@ -299,7 +299,7 @@ class CodegenContext {
def initMutableStates(): String = {
// It's possible that we add same mutable state twice, e.g. the
`mergeExpressions` in
// `TypedAggregateExpression`, we should call `distinct` here to
remove the duplicated ones.
- val initCodes = mutableStateInitCode.distinct
+ val initCodes = mutableStateInitCode.distinct.map(_ + "\n")
--- End diff --
ah, good catch!
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]