Skip to content

feat(bigquery-jdbc): implement PreparedStatement ParameterMetaData and Calendar date setters#13794

Open
Neenu1995 wants to merge 4 commits into
ps-part1-settersfrom
ps-part2-metadata
Open

feat(bigquery-jdbc): implement PreparedStatement ParameterMetaData and Calendar date setters#13794
Neenu1995 wants to merge 4 commits into
ps-part1-settersfrom
ps-part2-metadata

Conversation

@Neenu1995

@Neenu1995 Neenu1995 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

b/535194644

  • Parameter Metadata Introspection: Implemented BigQueryPreparedStatement.getParameterMetaData() for client-side schema discovery (getParameterCount, getParameterType, getParameterTypeName, getParameterClassName).
  • Timezone-Aware Calendar Setters: Implemented setDate(index, date, cal), setTime(index, time, cal), and setTimestamp(index, timestamp, cal) using field-projection math for accurate target timezone handling.
  • JSR-310 java.time Support: Integrated LocalDate, LocalTime, LocalDateTime, OffsetDateTime, Instant, and ZonedDateTime into setObject() overloads.
  • Type Registry Update: Registered java.time classes in BigQueryJdbcTypeMappings.classToType to map to StandardSQLTypeName.DATE, TIME, and TIMESTAMP.

@Neenu1995
Neenu1995 requested review from a team as code owners July 16, 2026 17:15
@Neenu1995
Neenu1995 changed the base branch from main to ps-part1-setters July 16, 2026 17:16

@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 enhances the BigQuery JDBC driver by implementing missing parameter setter methods in BigQueryPreparedStatement, adding BigQueryParameterMetaData support, and updating type mappings to include SMALLINT, TINYINT, and NULL types. The reviewer correctly identified that the setDate, setTime, and setTimestamp methods with Calendar overloads modify the provided Calendar object in-place, which is an unexpected side effect for callers. It is recommended to clone the Calendar object before performing modifications to ensure the original object remains unchanged.

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.

1 participant