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

    https://github.com/apache/spark/pull/22282#discussion_r214635480
  
    --- Diff: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaWriteTask.scala
 ---
    @@ -88,7 +92,30 @@ private[kafka010] abstract class KafkaRowWriter(
           throw new NullPointerException(s"null topic present in the data. Use 
the " +
             s"${KafkaSourceProvider.TOPIC_OPTION_KEY} option for setting a 
default topic.")
         }
    -    val record = new ProducerRecord[Array[Byte], 
Array[Byte]](topic.toString, key, value)
    +    val record = if (projectedRow.isNullAt(3)) {
    +      new ProducerRecord[Array[Byte], Array[Byte]](
    --- End diff --
    
    nit: Spark scala style guide stated below:
    
    https://github.com/databricks/scala-style-guide#spacing-and-indentation
    
    > For method and class constructor invocations, use 2 space indentation for 
its parameters and put each in each line when the parameters don't fit in two 
lines.
    
    there're multiple places which these lines can be compacted into one or two 
lines.


---

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

Reply via email to