feat(bigtable): add view_parameters support to BoundStatement#13673
Open
ad548 wants to merge 2 commits into
Open
feat(bigtable): add view_parameters support to BoundStatement#13673ad548 wants to merge 2 commits into
ad548 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for view parameters in SQL BoundStatements, introducing the viewParameters field, builder methods to set them, and updating the proto serialization and test proxy deserializer. A review comment correctly points out that the newly added public method setViewParameter(String, Value) lacks direct unit test coverage and provides a helpful code suggestion to test this single-parameter setter.
We need to add support for `view_parameters` in the Java Bigtable client library and the Java Test Proxy to unblock Centigrate testing. Note that the backend Bigtable server currently only supports String typed view parameters. 1. In the Java client library (`BoundStatement.java`): - Update `BoundStatement` and its `Builder` to support storing `view_parameters`. - Implement runtime type validation in `setViewParameter` to check `value.getKindCase() == Value.KindCase.STRING_VALUE`, throwing an `IllegalArgumentException` if a non-String value is passed. - Update `BoundStatement.toProto()` to populate the `view_parameters` field in the `ExecuteQueryRequest` proto. 2. In the Java Test Proxy (`BoundStatementDeserializer.java`): - Update it to extract `view_parameters` from the incoming gRPC `ExecuteQueryRequest` and bind them to the `BoundStatement` before execution (naturally inheriting runtime type validation via delegation). 3. In `BoundStatementTest.java`: - Add unit test verifying `view_parameters` binding and proto conversion. - Add unit test `setViewParameterRejectsNonStringValues` verifying that passing non-String values (int64, bool, unset values, and array values) throws an `IllegalArgumentException`. Note: `bigtable.proto` in `google-cloud-java` already includes `view_parameters` in `ExecuteQueryRequest`. TAG=agy CONV=11853e8d-5cf0-4c6b-8917-b8d6dbac0814 Change-Id: Ie9fb8c3c19d077a99cb3164365752ff7273cbf51
ad548
force-pushed
the
feat-view-parameters
branch
from
July 16, 2026 22:18
93f98fc to
198cc70
Compare
Change-Id: I9fd4b13273004223d84cdb4df1678a26e851d412
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ports the Java client changes supporting
view_parametersinExecuteQueryRequest(originally developed and reviewed internally in CL 13080 / branchadd-view-parameters-support).Changes
view_parameterssupport toBoundStatementand its builder.BoundStatementTestwith unit tests forview_parameters.BoundStatementDeserializerin test-proxy to handleview_parameters.Verification
ExecuteQueryRequestin generated GAPIC proto library already containsview_parameterssupport.google-cloud-bigtableand dependencies.