shrirangmhalgi commented on code in PR #56661:
URL: https://github.com/apache/spark/pull/56661#discussion_r3455150116


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/types/ops/TimeTypeParquetOps.scala:
##########
@@ -88,6 +90,11 @@ case class TimeTypeParquetOps(t: TimeType) extends 
ParquetTypeOps {
   // ==================== Vectorized Read ====================
 
   override def isBatchReadSupported(sqlConf: SQLConf): Boolean = true
+
+  // Spark internal: nanos-of-day; Parquet storage: INT64 micros-of-day. The 
updater ignores
+  // `descriptor` (the micros -> nanos conversion is the same for every 
TimeType precision).
+  override def getVectorUpdater(descriptor: ColumnDescriptor): 
Option[ParquetVectorUpdater] =

Review Comment:
   +1 on the `descriptor` validation. 
   
   One addition: the current tests pass `null` for `descriptor` 
(`getVectorUpdater(null)`), so even after the guard is added, the tests won't 
exercise the reject path. Worth adding a case with a real `ColumnDescriptor` 
for `INT32 TIME(MILLIS)` / `INT64 TIME(NANOS)` that asserts `getVectorUpdater` 
returns `None`.
   



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


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

Reply via email to