You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/13 06:56:36 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27890: [SPARK-31076][SQL][FOLLOWUP] Incapsulate date rebasing to `DaysWritable`

cloud-fan commented on a change in pull request #27890: [SPARK-31076][SQL][FOLLOWUP] Incapsulate date rebasing to `DaysWritable`
URL: https://github.com/apache/spark/pull/27890#discussion_r392057460
 
 

 ##########
 File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala
 ##########
 @@ -646,14 +617,7 @@ private[hive] trait HiveInspectors {
         case x: DateObjectInspector if x.preferWritable() =>
           data: Any => {
             if (data != null) {
-              // Rebasing written days via conversion to local dates.
-              // See the comment for `getDateWritable()`.
-              val daysSinceEpoch = x.getPrimitiveWritableObject(data).getDays
-              if (daysSinceEpoch < JULIAN_CUTOVER_DAY) {
-                rebaseJulianToGregorianDays(daysSinceEpoch)
-              } else {
-                daysSinceEpoch
-              }
+              x.getPrimitiveWritableObject(data).getDays
 
 Review comment:
   What if the returned `DateWritable` here is not our custom version?

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


With regards,
Apache Git Services

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