Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit ff33074

Browse files
cloud-java-botrahul2393
authored andcommitted
chore: generate libraries at Tue Jan 20 09:37:42 UTC 2026
1 parent aa35bd8 commit ff33074

3 files changed

Lines changed: 26 additions & 29 deletions

File tree

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRecipe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ private static void encodeSingleValuePart(
279279
switch (part.type.getCode()) {
280280
case BOOL:
281281
if (isAscending) {
282-
SsFormat.appendInt64Increasing(out, value.getBoolValue() ? 1 : 0);
282+
SsFormat.appendBoolIncreasing(out, value.getBoolValue());
283283
} else {
284-
SsFormat.appendInt64Decreasing(out, value.getBoolValue() ? 1 : 0);
284+
SsFormat.appendBoolDecreasing(out, value.getBoolValue());
285285
}
286286
break;
287287
case INT64:

google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeCacheTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,11 @@ public void fingerprintExecuteSqlUsesParamShape() throws Exception {
108108
assertNotEquals(fp, KeyRecipeCache.fingerprint(addParam));
109109

110110
ExecuteSqlRequest changeType =
111-
ExecuteSqlRequest.newBuilder(req)
112-
.putParamTypes("p1", parseType("code: BYTES"))
113-
.build();
111+
ExecuteSqlRequest.newBuilder(req).putParamTypes("p1", parseType("code: BYTES")).build();
114112
assertNotEquals(fp, KeyRecipeCache.fingerprint(changeType));
115113

116114
ExecuteSqlRequest.Builder changeParamValueBuilder = ExecuteSqlRequest.newBuilder(req);
117-
changeParamValueBuilder
118-
.getParamsBuilder()
119-
.putFields("p1", parseValue("string_value: \"bar\""));
115+
changeParamValueBuilder.getParamsBuilder().putFields("p1", parseValue("string_value: \"bar\""));
120116
ExecuteSqlRequest changeParamValue = changeParamValueBuilder.build();
121117
assertEquals(fp, KeyRecipeCache.fingerprint(changeParamValue));
122118

google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/KeyRecipeTest.java

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,24 @@ public class KeyRecipeTest {
3131

3232
@Test
3333
public void queryParamsUsesStructIdentifiers() throws Exception {
34-
com.google.spanner.v1.KeyRecipe recipeProto = createRecipe(
35-
"part { tag: 1 }\n"
36-
+ "part {\n"
37-
+ " order: ASCENDING\n"
38-
+ " null_order: NULLS_FIRST\n"
39-
+ " type { code: STRING }\n"
40-
+ " identifier: \"p0\"\n"
41-
+ " struct_identifiers: 1\n"
42-
+ "}\n");
43-
34+
com.google.spanner.v1.KeyRecipe recipeProto =
35+
createRecipe(
36+
"part { tag: 1 }\n"
37+
+ "part {\n"
38+
+ " order: ASCENDING\n"
39+
+ " null_order: NULLS_FIRST\n"
40+
+ " type { code: STRING }\n"
41+
+ " identifier: \"p0\"\n"
42+
+ " struct_identifiers: 1\n"
43+
+ "}\n");
4444

4545
Struct params =
4646
parseStruct(
4747
"fields {\n"
4848
+ " key: \"p0\"\n"
4949
+ " value {\n"
50-
+ " list_value { values { string_value: \"a\" } values { string_value: \"b\" } }\n"
50+
+ " list_value { values { string_value: \"a\" } values { string_value: \"b\" }"
51+
+ " }\n"
5152
+ " }\n"
5253
+ "}\n");
5354

@@ -59,14 +60,15 @@ public void queryParamsUsesStructIdentifiers() throws Exception {
5960

6061
@Test
6162
public void queryParamsUsesConstantValue() throws Exception {
62-
com.google.spanner.v1.KeyRecipe recipeProto = createRecipe(
63-
"part { tag: 1 }\n"
64-
+ "part {\n"
65-
+ " order: ASCENDING\n"
66-
+ " null_order: NULLS_FIRST\n"
67-
+ " type { code: STRING }\n"
68-
+ " value { string_value: \"const\" }\n"
69-
+ "}\n");
63+
com.google.spanner.v1.KeyRecipe recipeProto =
64+
createRecipe(
65+
"part { tag: 1 }\n"
66+
+ "part {\n"
67+
+ " order: ASCENDING\n"
68+
+ " null_order: NULLS_FIRST\n"
69+
+ " type { code: STRING }\n"
70+
+ " value { string_value: \"const\" }\n"
71+
+ "}\n");
7072

7173
KeyRecipe recipe = KeyRecipe.create(recipeProto);
7274
TargetRange target = recipe.queryParamsToTargetRange(Struct.getDefaultInstance());
@@ -76,8 +78,7 @@ public void queryParamsUsesConstantValue() throws Exception {
7678

7779
private static com.google.spanner.v1.KeyRecipe createRecipe(String text)
7880
throws TextFormat.ParseException {
79-
com.google.spanner.v1.KeyRecipe.Builder builder =
80-
com.google.spanner.v1.KeyRecipe.newBuilder();
81+
com.google.spanner.v1.KeyRecipe.Builder builder = com.google.spanner.v1.KeyRecipe.newBuilder();
8182
TextFormat.merge(text, builder);
8283
return builder.build();
8384
}

0 commit comments

Comments
 (0)