ViktorBystrov72 opened a new pull request, #60548: URL: https://github.com/apache/spark/pull/60548
### What changes were proposed in this pull request? Format `java.time.Instant` filter literals through `java.sql.Timestamp`, using the same JVM time zone as the existing Timestamp path. Add dialect and H2 reader regressions, plus a migration note. ### Why are the changes needed? [SPARK-61543](https://issues.apache.org/jira/browse/SPARK-61543) reports that JDBC predicate pushdown formats Instant values in the Spark session time zone, while JDBC drivers can interpret the resulting zoneless literal in the JVM default time zone. When those differ, filter bounds shift and matching rows change. ### Does this PR introduce _any_ user-facing change? Yes. Instant and Timestamp literals representing the same instant now produce the same base-dialect SQL. A query filtering the Chicago day from a UTC JDBC connection retains the same rows with predicate pushdown enabled and disabled. ### How was this patch tested? Both new tests fail on the original production code. The dialect test compares Instant/Timestamp rendering for PostgreSQL, H2, MySQL and Derby with two JVM time zones and three Spark session time zones. The H2 integration test checks a time-zone-aware column across the day boundary, both datetime API settings, and pushdown enabled/disabled. H2 sessions are explicitly configured to UTC. - `sql/testOnly *JDBCSuite -- -z SPARK-61543`: both new tests passed. - `sql/testOnly *JDBCSuite -- -z Timestamp -z Instant`: 13 tests passed. - Production and test ScalaStyle: passed. - Apache RAT: passed with the repository exclusions plus the `.git` worktree metadata file. The suite emitted a possible-daemon-thread-leak warning in both baseline and patched runs. No live PostgreSQL integration test is claimed. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (gpt-6.1-sol; exact tool build unavailable). Codex assisted with the implementation, tests, migration note, and this description. -- 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]
