nandorKollar 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_r253776790
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilters.scala
 ##########
 @@ -100,6 +104,28 @@ private[parquet] class ParquetFilters(
     Binary.fromConstantByteArray(fixedLengthBytes, 0, numBytes)
   }
 
+  private def timestampValue(timestampType: TimestampLogicalTypeAnnotation, v: 
Any): JLong =
+    if (timestampType.getUnit == TimeUnit.MICROS) {
+      Option(v).map(
 
 Review comment:
   Thanks, I also replaced the if to a match expression. With if, the code 
would silently convert NANO precision timestamps incorrectly, that's a bug, I 
think throwing an exception in this case is a better option.

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