Skip to content

feat: add support for Execute Query#1613

Merged
jackdingilian merged 14 commits intogoogleapis:mainfrom
Unoperate:execute-query
Jul 8, 2025
Merged

feat: add support for Execute Query#1613
jackdingilian merged 14 commits intogoogleapis:mainfrom
Unoperate:execute-query

Conversation

@kboroszko
Copy link
Contributor

Description

This PR adds support for two new methods executeQuery and prepareStatement in the Node.js Bigtable client library. The prepareStatement method allows the users to create SQL-like queries which can then be executed on Bigtable tables.

Impact

executeQuery provides a simpler alternative for users who want to retrieve filtered rows without manually building complex filter chains.

Testing

  • Unit tests were added.
  • New testproxy implementation was also provided.
  • Integration tests in the system-test directory were also added.

Checklist

  • 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
  • Appropriate docs were updated
  • Appropriate comments were added, particularly in complex areas or places that require background
  • No new warnings or issues will be generated from this change

@kboroszko kboroszko requested a review from a team June 5, 2025 19:05
@kboroszko kboroszko requested a review from a team as a code owner June 5, 2025 19:05
@snippet-bot
Copy link

snippet-bot bot commented Jun 5, 2025

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: bigtable Issues related to the googleapis/nodejs-bigtable API. labels Jun 5, 2025
@jackdingilian
Copy link

Docs check is failing because of a couple lingering references to the internal repo:

Error: Detected 2 broken links.
 docs
   [429] https://github.com/Unoperate/nodejs-bigtable-fork/blob/execute-query/samples/quickstart.js
   [429] https://github.com/Unoperate/nodejs-bigtable-fork/blob/execute-query/samples/writeSimple.js

ci / test (22) failure is an unrelated flake.

Conformance tests look to have a lot of real failures though

};

const parameterTypes = {
row_key: Bigtable.ExecuteQueryTypes.String(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be SqlTypes now and it needs to be a separate import, it's not namespaced under Bigtable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


instance
.prepareStatement(prepareStatementOptions)
.then(preparedStatement =>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be then([preparedStatement] => ...

Since we wrap PreparedStatement in PreparedSTatement response

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • .github/workflows/ci.yaml - .github/workflows/ci.yaml (GitHub Actions) should be updated in synthtool

- uses: JustinBeckwith/linkinator-action@v1
with:
paths: docs/
concurrency: 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a build warning saying this shouldn't be edited directly, can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I pushed more than I meant to, sorry about that. These were my attempts to fix the CI, I removed them.

jackdingilian
jackdingilian previously approved these changes Jun 24, 2025
Copy link

@jackdingilian jackdingilian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Docs check seems flaky, I will keep re-running it until it passes

jackdingilian
jackdingilian previously approved these changes Jun 27, 2025
@jackdingilian jackdingilian added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2025
@jackdingilian jackdingilian added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2025
@jackdingilian jackdingilian added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 8, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 8, 2025
@jackdingilian jackdingilian merged commit e3894ed into googleapis:main Jul 8, 2025
16 of 19 checks passed
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/nodejs-bigtable API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants