stevomitric commented on code in PR #56661:
URL: https://github.com/apache/spark/pull/56661#discussion_r3466937579
##########
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:
refactored `getVectorUpdater` to validate the descriptor via a shared
`isCompatibleParquetType`. Returns `Some` for INT64 TIME(MICROS)/TIME(NANOS).
Added a test also.
--
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]