abir123rajbongshi-debug commented on code in PR #60609:
URL: https://github.com/apache/spark/pull/60609#discussion_r4601090263


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala:
##########
@@ -480,7 +481,9 @@ object JdbcUtils extends Logging with SQLConfHelper {
     case _: StringType => JDBCValueGetter.StringGetter
     case TimestampType if metadata.contains("logical_time_type") =>
       JDBCValueGetter.LogicalTimeGetter
-    case TimestampType => JDBCValueGetter.TimestampGetter(dialect)
+    case TimestampType =>
+      JDBCValueGetter.TimestampGetter(
+        dialect, options.flatMap(_.timestampCalendarTimeZone).map(tz => 
Calendar.getInstance(tz)))

Review Comment:
   Done. With the option set, expressions with timestamp literals 
(TimestampType and nanosecond LTZ) aren't pushed down. That covers V1 
unhandledFilters/buildScan, and in V2 predicates, aggregates and group-bys, 
joins and sorts. Tests cover equality and range filters on V1 and V2, a 
same-scan check that non-timestamp filters are still pushed, and no change 
without the option. Also added a doc sentence.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to