maropu commented on a change in pull request #23953: [SPARK-27040][SQL] Avoid 
using unnecessary JoinRow in FileFormat
URL: https://github.com/apache/spark/pull/23953#discussion_r261968202
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala
 ##########
 @@ -132,7 +132,7 @@ trait FileFormat {
     new (PartitionedFile => Iterator[InternalRow]) with Serializable {
       private val fullSchema = requiredSchema.toAttributes ++ 
partitionSchema.toAttributes
 
-      private val joinedRow = new JoinedRow()
+      private lazy val joinedRow = new JoinedRow()
 
 Review comment:
   We cannot move `joinedRow` inside `apply` below?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to