MaxGekk commented on a change in pull request #27915: [WIP][SPARK-31159][SQL] 
Rebase date/timestamp from/to Julian calendar in parquet
URL: https://github.com/apache/spark/pull/27915#discussion_r392999450
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRowConverter.scala
 ##########
 @@ -296,6 +317,15 @@ private[parquet] class ParquetRowConverter(
           }
         }
 
+      case DateType if rebaseDateTime =>
+        new ParquetPrimitiveConverter(updater) {
+          override def addInt(value: Int): Unit = {
+            val rebased = DateTimeUtils.rebaseJulianToGregorianDays(value)
+            // DateType is not specialized in `SpecificMutableRow`, have to 
box it here.
+            updater.set(rebased.asInstanceOf[DateType#InternalType])
 
 Review comment:
   No error, I will remove `.asInstanceOf[DateType#InternalType]`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to