Skip to content

Commit 337e432

Browse files
authored
fix: Add missing break; to PROTO and ENUM value type check (#2672)
Change-Id: Ida5c35a892aee7909bb623d3a8a859af6258611b Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Rollback plan is reviewed and LGTMed - [ ] All new data plane features have a completed end to end testing plan Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent 2214d52 commit 337e432

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachine.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ static void validateValueAndType(SqlType<?> type, Value value) {
199199
checkExpectedKind(value, Value.KindCase.STRING_VALUE, type);
200200
break;
201201
case BYTES:
202+
case PROTO:
202203
checkExpectedKind(value, Value.KindCase.BYTES_VALUE, type);
203204
break;
204205
case INT64:
206+
case ENUM:
205207
checkExpectedKind(value, Value.KindCase.INT_VALUE, type);
206208
break;
207209
case FLOAT64:
@@ -253,10 +255,6 @@ static void validateValueAndType(SqlType<?> type, Value value) {
253255
mapType.getValueType(), mapElement.getArrayValue().getValuesList().get(1));
254256
}
255257
break;
256-
case PROTO:
257-
checkExpectedKind(value, Value.KindCase.BYTES_VALUE, type);
258-
case ENUM:
259-
checkExpectedKind(value, Value.KindCase.INT_VALUE, type);
260258
default:
261259
// This should be caught already at ResultSetMetadata creation
262260
throw new IllegalStateException("Unrecognized type: " + type);

0 commit comments

Comments
 (0)