feat(bigquery-jdbc): standardize parameter handling and calendar defensive copying across statement interfaces#13805
feat(bigquery-jdbc): standardize parameter handling and calendar defensive copying across statement interfaces#13805Neenu1995 wants to merge 40 commits into
Conversation
…d Calendar date setters
… CallableStatement
…yParameterMetaData
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…ryJdbcSqlFeatureNotSupportedException
…nsive copying across statement interfaces
There was a problem hiding this comment.
Code Review
This pull request refactors parameter handling, metadata retrieval, and null-safety in the BigQuery JDBC driver, including implementing wasNull() tracking, throwing proper exceptions for unsupported features, and preventing caller Calendar mutation. Feedback on the changes highlights a critical, recurring bug in BigQueryCallableStatement where isAssignableFrom checks for Date, Time, and Timestamp are reversed, which would cause runtime ClassCastExceptions when attempting to cast superclasses to subclasses.
…d-java into ps-part2-metadata
… in BigQueryTypeCoercionUtility
… and update CallableStatement and ResultSet to delegate to BigQueryTypeCoercionUtility
…rom BigQueryParameterHandler
…rom BigQueryParameterHandler and delegate directly to BigQueryTypeCoercionUtility
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
|
/gemini review |
…rameterHandlerTest to FieldValueTypeBigQueryCoercionUtilityTest
There was a problem hiding this comment.
Code Review
This pull request refactors date, time, and timestamp retrieval and setting in BigQueryBaseResultSet and BigQueryCallableStatement to use BigQueryTypeCoercionUtility helper methods, improves null handling, and implements wasNull() tracking. The review feedback highlights critical issues in the getObject methods of BigQueryCallableStatement, including a missing checkClosed() call, failure to update lastReadWasNull, a reversed assignability check, and a potential NullPointerException. Additionally, the reviewer recommends restoring stronger assertions in several unit tests where assertions were weakened to simple null checks.
…r in BigQueryTypeCoercionUtility
…r in BigQueryTypeCoercionUtility
…tters and setters
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…d-java into ps-part3-callable
b/535194644
isAssignableFromchecks withinstanceof,Number/Datecoercions, and direct delegation togetObject().arg0,arg1) to standard JDBC names (parameterIndex,parameterName,scale).Calendartimezone conversions usingjava.timeAPIs across statements and result sets.IN,OUT, andINOUTparameter modes inBigQueryParameterMetaData.Calendarsetters and replaced silent stubs with explicit unsupported feature exceptions.