Skip to content

feat: Add PreparedStatement and update ExecuteQuery API to use it #2534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 24, 2025

Conversation

jackdingilian
Copy link
Contributor

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 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.

This doesn't do anything yet. I will follow with:
- Refactoring of type converion code to populate param types
- Connect PreparedStatement to ExecuteQuery
- PreparedStatement refresh implementation

Change-Id: I98f32cd65fee3dd43605f6353f0a4d6ad52630c8
Use it to populate paramTypes in PrepareQueryRequest

Change-Id: I8340741fd7377a9e2b87972366ad74ed0cb3354a
This makes a series of changes to use the result of PrepareQuery for execute:
- Replace Statement with a BoundStatement based on PreparedStatement
- set preparedQuery in request, rather than 'query'
- Use the metadata response from Prepare, this will no longer be present in the execute stream
- Update Metadata future handling to work well with PrepareQuery refresh in the future

Change-Id: Ie3249d0c0bd422b4aaf1c8878660d27288b4b6b0
Change-Id: Ifbe25eec9fd7d1a79d67d1629ec1782c067ab008
This incorporates the checksum & reset logic added since preview.

It also updates the metadata resolution to be deffered until the first resume
token has been received (see comment)

Change-Id: I0eda81f85e86a7747c6ce2750dbeaa1f8d0d09b4
Renames MetadataResolvingCallable to PlanRefreshingCallable as this will be the place we handle
plan refresh & metadata resolution
Change-Id: I6d5329ced6d9a4228a3a49fbc8b5f497d8678cce

Change-Id: I92dcde9e67459e0b8119b4c9d216a47fb6819758
Change-Id: I7a83e84d689e438c32c4e9a320b6fff52d86e0de
Change-Id: I22cdeb1560a0975c8f2ff380ca30f3e09070417d
…exclusions for changed beta api

This also temporarily disables the ExecuteQuery conformance tests so they can be rewritten to use Prepare.
Updated local copies of the tests are passing

Also fixes BoundStatement docs I missed in previous PR

Change-Id: I9024d50fff3c076064b8277fd4a5aa426e0b5de4
@jackdingilian jackdingilian requested review from a team as code owners March 19, 2025 22:16
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: bigtable Issues related to the googleapis/java-bigtable API. labels Mar 19, 2025
Change-Id: I5f73a4af1588d015e7e0edebf3ec73e188bf216e
@jackdingilian jackdingilian force-pushed the prepared-statement branch 2 times, most recently from 8ed8dae to 85fd11a Compare March 20, 2025 16:12
Change-Id: Iea243f2c89872f947b5b79e37fa507e403f5acea
@andre-sampaio andre-sampaio added the automerge Merge the pull request once unit tests and other checks pass. label Mar 24, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit 49d4d09 into googleapis:main Mar 24, 2025
20 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants