File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3282,11 +3282,12 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
3282
3282
ErrorCode .INVALID_ARGUMENT , "Unsupported key part type: " + type .getCode ().name ());
3283
3283
}
3284
3284
} else if (part .hasStringValue ()) {
3285
- // TODO: Handle UUID when it is part of the key.
3286
3285
if (type .getCode () == TypeCode .NUMERIC ) {
3287
3286
String ascii = part .getStringValue ();
3288
3287
cloudKey .append (new BigDecimal (ascii ));
3289
- } else {
3288
+ } if (type .getCode () == TypeCode .UUID ) {
3289
+ cloudKey .append (UUID .fromString (part .getStringValue ()));
3290
+ }else {
3290
3291
cloudKey .append (part .getStringValue ());
3291
3292
}
3292
3293
} else if (part .hasTimestampValue ()) {
You can’t perform that action at this time.
0 commit comments