Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19737#discussion_r152011125
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeRowJoiner.scala
 ---
    @@ -88,7 +112,20 @@ object GenerateUnsafeRowJoiner extends 
CodeGenerator[(StructType, StructType), U
               s"$getLong(obj2, offset2 + ${(i - bitset1Words) * 8})"
             }
           }
    -      s"$putLong(buf, ${offset + i * 8}, $bits);"
    +      s"$putLong(buf, ${offset + i * 8}, $bits);\n"
    +    }
    +
    +    val functions = mutable.ArrayBuffer.empty[String]
    +    val args = "java.lang.Object obj1, long offset1, java.lang.Object 
obj2, long offset2"
    +    val copyBitsets = splitPlatformCode(copyBitset).zipWithIndex.map { 
case(body, index) =>
    --- End diff --
    
    then create one. The benefit is code reuse and the nested class optimization


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to