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 2020/04/02 16:29:31 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #28102: [SPARK-31327][SQL] Write Spark version into Avro file metadata

MaxGekk commented on a change in pull request #28102: [SPARK-31327][SQL] Write Spark version into Avro file metadata
URL: https://github.com/apache/spark/pull/28102#discussion_r402443422
 
 

 ##########
 File path: external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOutputWriter.scala
 ##########
 @@ -45,20 +48,19 @@ private[avro] class AvroOutputWriter(
    * Overrides the couple of methods responsible for generating the output streams / files so
    * that the data can be correctly partitioned
    */
-  private val recordWriter: RecordWriter[AvroKey[GenericRecord], NullWritable] =
-    new AvroKeyOutputFormat[GenericRecord]() {
-
+  private val recordWriter: RecordWriter[AvroKey[GenericRecord], NullWritable] = {
+    val sparkVersion = Map(SPARK_VERSION_METADATA_KEY -> SPARK_VERSION_SHORT).asJava
 
 Review comment:
   Could you update the comment https://github.com/apache/spark/blob/86cc907448f0102ad0c185e87fcc897d0a32707f/sql/core/src/main/scala/org/apache/spark/sql/package.scala#L50-L51

----------------------------------------------------------------
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