Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20637#discussion_r209822349
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeProjection.scala
 ---
    @@ -43,25 +43,29 @@ object GenerateUnsafeProjection extends 
CodeGenerator[Seq[Expression], UnsafePro
         case _ => false
       }
     
    -  // TODO: if the nullability of field is correct, we can use it to save 
null check.
       private def writeStructToBuffer(
           ctx: CodegenContext,
           input: String,
           index: String,
    -      fieldTypes: Seq[DataType],
    +      fieldTypeAndNullables: Seq[(DataType, Boolean)],
    --- End diff --
    
    I think you can define one within this class for readability. Probably we 
should take a look to deduplicate them for the instances you pointed out, but 
not sure yet for now if how much that deduplication improve the readability and 
if that's worth. Those are all look rather defined and used within small scopes 
rather locally.


---

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

Reply via email to