Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20851#discussion_r176971146
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilters.scala
---
@@ -50,6 +59,10 @@ private[parquet] object ParquetFilters {
(n: String, v: Any) => FilterApi.eq(
binaryColumn(n),
Option(v).map(b =>
Binary.fromReusedByteArray(v.asInstanceOf[Array[Byte]])).orNull)
+ case DateType if SQLConf.get.parquetFilterPushDownDate =>
+ (n: String, v: Any) => FilterApi.eq(
+ intColumn(n),
+ Option(v).map(date =>
dateToDays(date.asInstanceOf[Date]).asInstanceOf[Integer]).orNull)
--- End diff --
sorry I was wrong. I took a look at how these dates get created, in
`DataSourceStrategy.translateFilter`. Actually they are created via
`DateTimeUtils.toJavaDate` without timezone, which means here we should not use
timezone either.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]