attilapiros commented on a change in pull request #23721: 
[SPARK-26797][SQL][WIP] Start using the new logical types API of Parquet 1.11.0 
instead of the deprecated one
URL: https://github.com/apache/spark/pull/23721#discussion_r253049250
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilters.scala
 ##########
 @@ -221,22 +243,22 @@ private[parquet] class ParquetFilters(
     case ParquetDateType if pushDownDate =>
       (n: String, v: Any) =>
         FilterApi.lt(intColumn(n), 
dateToDays(v.asInstanceOf[Date]).asInstanceOf[Integer])
-    case ParquetTimestampMicrosType if pushDownTimestamp =>
-      (n: String, v: Any) => FilterApi.lt(
-        longColumn(n),
-        
DateTimeUtils.fromJavaTimestamp(v.asInstanceOf[Timestamp]).asInstanceOf[JLong])
-    case ParquetTimestampMillisType if pushDownTimestamp =>
+    case ParquetSchemaType(logicalType, _class, INT64, _) if pushDownTimestamp 
&&
+      _class == classOf[TimestampLogicalTypeAnnotation] =>
       (n: String, v: Any) => FilterApi.lt(
-        longColumn(n),
-        v.asInstanceOf[Timestamp].getTime.asInstanceOf[JLong])
+          longColumn(n),
 
 Review comment:
   nit: too much indentation

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to