Skip to content

fix(bigquery-jdbc): refine temporal timezone coercion and PreparedStatement parameter setters#13813

Merged
Neenu1995 merged 10 commits into
mainfrom
ps-part2b-temporal-setters
Jul 21, 2026
Merged

fix(bigquery-jdbc): refine temporal timezone coercion and PreparedStatement parameter setters#13813
Neenu1995 merged 10 commits into
mainfrom
ps-part2b-temporal-setters

Conversation

@Neenu1995

@Neenu1995 Neenu1995 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

b/535194644

  • Centralized Timezone Coercion: Consolidated Calendar timezone conversions in BigQueryTypeCoercionUtility using java.time APIs.
  • Temporal Helper Refactoring: Extracted setTemporalObject helper to eliminate duplicate temporal type logic across setObject overloads.
  • Defensive Copying & Unsupported Stubs: Added defensive copying for Calendar setters and replaced silent stubs with BigQueryJdbcSqlFeatureNotSupportedException.
  • Expanded Test Suite: Added unit and integration tests covering temporal setters and calendar conversion edge cases.

@Neenu1995
Neenu1995 requested review from a team as code owners July 17, 2026 20:08

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements several JDBC features in BigQueryPreparedStatement, including support for Java 8 date/time types in setObject, Calendar overloads for setting dates, times, and timestamps, and metadata retrieval methods (getParameterMetaData and getMetaData). The feedback suggests refactoring convertTimeWithCalendar to use the modern java.time API to avoid legacy Calendar manipulation and preserve millisecond precision. Additionally, it is recommended to deduplicate the temporal type checks in setObject overloads into a helper method and remove unused dead code like convertDateToCalendar and getSafeCalendar.

@Neenu1995

Copy link
Copy Markdown
Contributor Author

/gcbrun

Base automatically changed from ps-part2a-metadata to main July 21, 2026 17:01
@Neenu1995

Copy link
Copy Markdown
Contributor Author

/gcbrun

@Neenu1995
Neenu1995 merged commit 6f68c4d into main Jul 21, 2026
206 checks passed
@Neenu1995
Neenu1995 deleted the ps-part2b-temporal-setters branch July 21, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants