nsivabalan commented on code in PR #17601:
URL: https://github.com/apache/hudi/pull/17601#discussion_r2820218073


##########
hudi-spark-datasource/hudi-spark3.5.x/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark35LegacyHoodieParquetFileFormat.scala:
##########
@@ -63,15 +69,31 @@ import 
scala.collection.convert.ImplicitConversions.`collection AsScalaIterable`
  *   <li>Schema on-read</li>
  * </ol>
  */
-class Spark35LegacyHoodieParquetFileFormat(private val 
shouldAppendPartitionValues: Boolean) extends ParquetFileFormat {
+class Spark35LegacyHoodieParquetFileFormat(private val 
shouldAppendPartitionValues: Boolean,
+                                           private val avroTableSchema: 
Schema) extends ParquetFileFormat with Logging {

Review Comment:
   since we are modifying the arguments here, we might as well compute the 
value for hasTimestampMillisFieldInTableSchema once in the driver and pass it 
here. 
   as of now, L83 to 87 are lazily evaluated in executor and every spark task 
need to recompute it. 
   
   Lets move the check to driver. atleast for those tables which does not have 
any timestamp based logical types, lets avoid calling any of repair schema 
calls w/n spark tasks. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to