dongjoon-hyun commented on a change in pull request #24441: [SPARK-27494][SS] 
Null values don't work in Kafka source v2
URL: https://github.com/apache/spark/pull/24441#discussion_r278160728
 
 

 ##########
 File path: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaRecordToUnsafeRowConverter.scala
 ##########
 @@ -30,13 +30,19 @@ private[kafka010] class KafkaRecordToUnsafeRowConverter {
 
   def toUnsafeRow(record: ConsumerRecord[Array[Byte], Array[Byte]]): UnsafeRow 
= {
     rowWriter.reset()
+    rowWriter.unsetNullAt(0)
+    rowWriter.unsetNullAt(1)
 
 Review comment:
   If `unset` is missed, `rowWriter.reset()` is the better place to `unset` 
them. Could you do that inside `reset()` function instead? Then, we don't need 
to add 
https://github.com/apache/spark/pull/24441/files#diff-c654dda59109239bce5498cbc30ab251R114
 in this PR.
   
   cc @cloud-fan , @zsxwing 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to