feat(bigquery-jdbc): implement PreparedStatement ParameterMetaData and Calendar date setters#13794
feat(bigquery-jdbc): implement PreparedStatement ParameterMetaData and Calendar date setters#13794Neenu1995 wants to merge 19 commits into
Conversation
There was a problem hiding this comment.
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.
…yParameterMetaData
…d-java into ps-part2-metadata
… in BigQueryTypeCoercionUtility
…rom BigQueryParameterHandler and delegate directly to BigQueryTypeCoercionUtility
…rameterHandlerTest to FieldValueTypeBigQueryCoercionUtilityTest
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements ParameterMetaData support, adds metadata retrieval for BigQueryPreparedStatement, and introduces support for Java 8 java.time classes alongside timezone-aware conversions using Calendar overloads. The reviewer feedback suggests adding a defensive null check for parameterHandler in BigQueryParameterMetaData to prevent a potential NullPointerException, and optimizing the timezone conversion utility methods by replacing expensive Calendar.getInstance() calls with Java 8 java.time classes.
…r in BigQueryTypeCoercionUtility
…tters and setters
b/535194644
BigQueryParameterMetaData(java.sql.ParameterMetaData) to support parameter count, type mappings, nullability, and dynamic parameter modes (IN/OUT/INOUT).Calendar-aware temporal setters (setDate,setTime,setTimestamp),setObjectsupport forjava.timetypes (LocalDate,LocalTime,LocalDateTime,Instant), and missing setter overloads (setShort,setBytes,setArray,setNull).Calendar-based temporal conversions inBigQueryTypeCoercionUtility, optimized withjava.timeAPIs for zero-allocation wall-clock field extraction and defensiveCalendarcloning.