fix(bqjdbc): Revert DatabaseMetaData field to be non-static in BigQueryConnection#12778
fix(bqjdbc): Revert DatabaseMetaData field to be non-static in BigQueryConnection#12778
Conversation
logachev
left a comment
There was a problem hiding this comment.
Should we also revert dynamic Statement within Metadata?
Not sure what the right call is, but might be easier to track telemetry around metadata calls if statement is being reused in a future?
There was a problem hiding this comment.
Code Review
This pull request modifies the databaseMetaData field in BigQueryConnection.java by removing the static and private modifiers. The review feedback suggests retaining the private access modifier to ensure proper encapsulation while supporting the removal of the static keyword for JDBC compliance.
...gle-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryConnection.java
Show resolved
Hide resolved
I feel like the current pattern is better in terms of thread safety(each call uses an isolated instance, no collision) and resource management(can be closed easily with closeOnCompletion). Also, considering metadata fetching is not a very frequent operation should be ok to have a per method statement instance. |
No description provided.