You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/24 15:23:58 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #24441: [SPARK-27494][SS] Null values don't work in Kafka source v2

cloud-fan 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_r278182919
 
 

 ##########
 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:
   After `reset`, we should also call `zeroOutNullBytes`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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