Skip to content

Commit 706b5dc

Browse files
committed
fix: review comments + dependencies
1 parent 8defc9c commit 706b5dc

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

spanner/cloud-client/pom.xml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ limitations under the License.
3434
<maven.compiler.source>1.8</maven.compiler.source>
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636
<opencensus.version>0.26.0</opencensus.version>
37+
<spanner.version>1.51.0</spanner.version>
3738
</properties>
3839

3940
<!-- Include the BOM to ensure compatibility across multiple google-cloud-* libraries -->
@@ -42,7 +43,7 @@ limitations under the License.
4243
<dependency>
4344
<groupId>com.google.cloud</groupId>
4445
<artifactId>google-cloud-bom</artifactId>
45-
<version>0.84.0-alpha</version>
46+
<version>0.122.4-alpha</version>
4647
<type>pom</type>
4748
<scope>import</scope>
4849
</dependency>
@@ -51,34 +52,26 @@ limitations under the License.
5152
<!-- End of BOM -->
5253
<dependencies>
5354
<dependency>
54-
<!-- Version auto-managed by BOM -->
5555
<groupId>com.google.cloud</groupId>
5656
<artifactId>google-cloud-spanner</artifactId>
57-
<exclusions>
58-
<exclusion>
59-
<groupId>com.google.guava</groupId>
60-
<artifactId>guava-jdk5</artifactId>
61-
</exclusion>
62-
<exclusion>
63-
<groupId>io.opencensus</groupId>
64-
<artifactId>opencensus-api</artifactId>
65-
</exclusion>
66-
<exclusion>
67-
<groupId>io.grpc</groupId>
68-
<artifactId>grpc-netty-shaded</artifactId>
69-
</exclusion>
70-
<exclusion>
71-
<groupId>io.grpc</groupId>
72-
<artifactId>grpc-core</artifactId>
73-
</exclusion>
74-
</exclusions>
57+
<version>${spanner.version}</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>com.google.api.grpc</groupId>
61+
<artifactId>proto-google-cloud-spanner-admin-instance-v1</artifactId>
62+
<version>${spanner.version}</version>
7563
</dependency>
76-
7764
<dependency>
78-
<groupId>com.google.guava</groupId>
79-
<artifactId>guava</artifactId>
80-
<version>28.2-jre</version>
65+
<groupId>com.google.api.grpc</groupId>
66+
<artifactId>proto-google-cloud-spanner-v1</artifactId>
67+
<version>${spanner.version}</version>
8168
</dependency>
69+
<dependency>
70+
<groupId>com.google.api.grpc</groupId>
71+
<artifactId>proto-google-cloud-spanner-admin-database-v1</artifactId>
72+
<version>${spanner.version}</version>
73+
</dependency>
74+
8275
<dependency>
8376
<groupId>io.opencensus</groupId>
8477
<artifactId>opencensus-api</artifactId>

spanner/cloud-client/src/main/java/com/example/spanner/SpannerSample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ static void clientWithQueryOptions(DatabaseId db) {
14391439
SpannerOptions options =
14401440
SpannerOptions.newBuilder()
14411441
.setDefaultQueryOptions(
1442-
db, QueryOptions.newBuilder().setOptimizerVersion("latest").build())
1442+
db, QueryOptions.newBuilder().setOptimizerVersion("1").build())
14431443
.build();
14441444
Spanner spanner = options.getService();
14451445
DatabaseClient dbClient = spanner.getDatabaseClient(db);
@@ -1463,7 +1463,7 @@ static void queryWithQueryOptions(DatabaseClient dbClient) {
14631463
.executeQuery(
14641464
Statement
14651465
.newBuilder("SELECT SingerId, AlbumId, AlbumTitle FROM Albums")
1466-
.withQueryOptions(QueryOptions.newBuilder().setOptimizerVersion("latest").build())
1466+
.withQueryOptions(QueryOptions.newBuilder().setOptimizerVersion("1").build())
14671467
.build())) {
14681468
while (resultSet.next()) {
14691469
System.out.printf(

0 commit comments

Comments
 (0)