-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add support for arrays in ResultSets #36
Conversation
<dependency> | ||
<groupId>com.google.cloud</groupId> | ||
<artifactId>google-cloud-spanner</artifactId> | ||
<version>6.17.4</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want the PG version of the library?
6.17.4-pg-SNAPSHOT
I don't believe the PG changes have been rolled into mainline yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the test-lib that contains the mock Spanner server. That is (AFAIK) not included in the PG snapshot release. So this will only be used for test and starting the mock Spanner server.
That being said, the PG feature has now been merged into the Java client library and released, so I'll update this PR to use that version instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I tried using the newest version of the Spanner testlib locally, but that does not work because of the API changes between 6.17.4 and 6.19.0. So we are better off using the 6.17.4 testlib here, and then update everything once the JDBC driver also has been updated to use 6.19.0 (or we have gotten rid of the JDBC driver altogether).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We pull in the jdbc library 2.5.7-pg-SNAPSHOT which then pulls in the pg version of the client library 6.17.4-pg-SNAPSHOT.
Won't this lead to some problems by importing both versions of the library?
6.17.4-pg-SNAPSHOT
6.17.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. They are actually importing two different things:
- The JDBC library indeed imports
spanner-6.17.4-pg-SNAPSHOT
. This is the main library (basically everything insrc/main/java
of the library). - This import has the tag
<type>testlib</type>
which means that it only imports the test code of the library (basically everything insrc/test/java
of the library)
The above allows us to reuse test infrastructure from the client library. As it is imported with <scope>test</scope>
it will also not be included in the build of PgAdapter, so it is not shipped to customers.
We actually do the same in the JDBC driver itself:
- This line imports the Spanner client library.
- This line imports the Spanner client library testlib using scope test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds support for arrays in query result sets. Arrays are not yet implemented on the backend, so this feature is for now only tested against a mock Spanner server.