Skip to content

migrate code from googleapis/nodejs-bigquery#7111

Merged
sofisl merged 1097 commits intomainfrom
nodejs-bigquery-migration
Feb 4, 2026
Merged

migrate code from googleapis/nodejs-bigquery#7111
sofisl merged 1097 commits intomainfrom
nodejs-bigquery-migration

Conversation

@sofisl
Copy link
Contributor

@sofisl sofisl commented Feb 3, 2026

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)

Fixes #<issue_number_goes_here> 🦕

fhinkel and others added 30 commits November 6, 2021 01:05
As we move our ref docs to cloud.google.com, we rely on TSDoc rather JSDoc.

TSDoc expects comments before the first overloaded function, we
currently have those on the last function. Those comments don't make
it into the d.ts files. We need to move comments to the first
overloaded function rather than the last one.

Internally b/190631834

Script used: https://github.com/fhinkel/cloud-rad-script/blob/main/moveComments.js
* chore: change import format for better docs

* Add description to BigQueryOptions properties

* docs: change properties with function value to methods

See microsoft/rushstack#3031

Internally, see b/206943288

* Delete returns without further info

* fix linting

* Fix links

* fix missing line
* chore: update types from Discovery

* lint
* fix: refactor to extract options from query

* lint
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@types/tmp](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`0.2.2` -> `0.2.3`](https://renovatebot.com/diffs/npm/@types%2ftmp/0.2.2/0.2.3) | [![age](https://badges.renovateapi.com/packages/npm/@types%2ftmp/0.2.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2ftmp/0.2.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2ftmp/0.2.3/compatibility-slim/0.2.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2ftmp/0.2.3/confidence-slim/0.2.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-bigquery).
Update .repo-metadata.json as required by go/library-data-integrity
* feat: add jobs.delete

* fix test

* refactor

* lint

* lint

* update jobs test

* refactor

* lint

* remove unnecessary DeleteCallback

* remove unnecessary DeleteCallback

* update

* add deleteJobs() to system-test to delete stale job resources

* remove unnecessary jobs cleanup
* feat: add createInsertStream draft and tests

* refactor to remove InsertQueue

* restore default maxDelayMillis value

* restore default maxDelayMillis value

* moved row encoding to add, updated headers

* header

* add tests

* adding tests

* refactor stream and add tests

* update header dates

* add system tests

* remove comment

* update pending type

* add getOptionsDefaults to rowQueue
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sinonjs/sinon</summary>

### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#&#8203;1300)

[Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0)

-   [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392)
    Upgrade packages ([#&#8203;2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng)
    > -   Update all @&#8203;sinonjs/ packages
    >
    > -   Upgrade to fake-timers 9
    >
    > -   chore: ensure always using latest LTS release
-   [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b)
    Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#&#8203;2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw)
    > Co-authored-by: Carl-Erik Kopseng <carlerik@gmail.com>
-   [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9)
    Bump node-fetch from 2.6.1 to 2.6.7 ([#&#8203;2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot])
    > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@&#8203;users](https://togithub.com/users).noreply.github.com>
-   [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0)
    Add explicit export for `./*` ([#&#8203;2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき)
-   [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca)
    Bump cached-path-relative from 1.0.2 to 1.1.0 ([#&#8203;2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot])
-   [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6)
    Add documentation for assert.calledOnceWithMatch ([#&#8203;2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck)
-   [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38)
    Be more general in stripping off stack frames to fix Firefox tests ([#&#8203;2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw)
-   [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc)
    Check call count type ([#&#8203;2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw)
-   [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f)
    Fix [#&#8203;2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng)
-   [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f)
    Bump nokogiri from 1.11.4 to 1.13.1 ([#&#8203;2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot])
-   [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21)
    Bump shelljs from 0.8.4 to 0.8.5 ([#&#8203;2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot])
-   [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7)
    Run Prettier (Carl-Erik Kopseng)
-   [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1)
    Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#&#8203;2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson)
    > Fixes issue [#&#8203;2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties

*Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*

</details>

---

### Configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-bigquery).
Co-authored-by: meredithslota <meredithslota@google.com>
* add projectId override

* update nodejs-common version

* add tests

* update test
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: add support accessing jobs cross-project

* fix test
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…1382) (#1090)

* chore: Enable Size-Label bot in all googleapis NodeJs repositories

Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis NodeJs repositories

* Remove product

Remove product since it is by default true
Source-Link: googleapis/synthtool@f1562fa
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:bb4d47d0e770abad62699a4664ce6b9ff1629d50c276a6c75860a6a1853dd19b
Co-authored-by: Jeffrey Rennie <rennie@google.com>
Source-Link: googleapis/synthtool@6593fb2
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:1d25dfefd805b689a2a2356d35a25b13f2f67bcce55400246432c43a42e96214
Co-authored-by: Jeffrey Rennie <rennie@google.com>
Source-Link: googleapis/synthtool@9368bc7
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:f74e740638e66be7ced1540626217dbb72980eb73885b2339a70592f38c9ff2c
renovate-bot and others added 12 commits September 10, 2025 10:00
* chore: update types from Discovery

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Alvaro Viebrantz <aviebrantz@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Alvaro Viebrantz <aviebrantz@google.com>
Co-authored-by: Alvaro Viebrantz <aviebrantz@google.com>
* feat: next release from preview-9.x branch is v9.0.0-alpha.0

* feat: next release from preview-9.x branch is v9.0.0-alpha.0

* feat: next release from preview-9.x branch is v9.0.0-alpha.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Update owlbot.py

* Update release-please.yml

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@c9bbe7c
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d0d37c730ec00f109a1a20d298d6df88a965626f75aaf00c3cce94d56c9e2a9f

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…precision (#1588)

## Description

For TIMESTAMP type fields in the table schema we can now specify timestampPrecision property so that the TIMESTAMP field can have Picosecond precision.

To support this we ran `npm run types` to generate all changes in this PR to `types.d.ts`. This automatically makes changes upstream to the `createTable` method adding the `timestampPrecision` property for fields. Then we write a system test that
makes use of the new property to verify it works as intended.

## Impact

Allows users to create tables with TIMESTAMP fields that have picosecond precision.

## Testing

- Adds a test showing how precision is specified for fields of non-TIMESTAMP type.
- Adds a test showing how precision (timestampPrecision) is specified for TIMESTAMP type.

## Additional Information

An alternative considered is that we would just allow the user to specify a `precision` value in their table schema instead of timestampPrecision and the `timestampPrecision` property would be invisible to the user. However, this is not how it is done in other languages like https://togithub.com/googleapis/java-bigquery/pull/4014 and supporting `timestampPrecision` this way would complicate the codebase because we would need to exclude `timestampPrecision` from `TableField` and `TableSchema` interfaces which would introduce a lot of changes and complexity.

The new timestampPrecision field affects ITableFieldSchema which affects ITableSchema which affects TableSchema and TableMetadata. This means the following methods now support the new timestampPrecision property too:
- table.setMetadata
- bigquery.mergeSchemaWithRows
- table.createSchemaFromString
- all methods using the ITable, IQueryResponse, IJobStatistics2, IJobConfigurationLoad, IGetQueryResultsResponse, IExternalDataConfiguration interfaces

## Next Steps

- Add support for a SQL high precision data type, query parameterization, reading rows language value types, write API support and insert all support
Updates owlbot.py to exclude protected file '.github/workflows/ci.yaml' from automated owlbot updates.

* .github balks when attempts are made to update .github/workflows files without specific permission.
* Back in googleapis/nodejs-bigquery#1583 the ci.yaml file was customized and owlbot wants to undo those changes but owlbot does not have the right permissions to do so, causing a CI/CD test failure.

```
Starting Step #11
Step #11: Already have image (with digest): gcr.io/cloud-devrel-public-resources/owlbot-cli
Step #11: Retrieving PR info for googleapis/nodejs-bigquery
Step #11: Retrieved PR info for googleapis/nodejs-bigquery
Step #11: git add -A .
Step #11: git status . --porcelain
Step #11: git log -1 --format=%B
Step #11: git commit -m "🦉 Updates from OwlBot post-processor
Step #11: 
Step #11: See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md"
Step #11: git pull --no-verify
Step #11: git push --no-verify
Step #11: To https://github.com/yoshi-code-bot/nodejs-bigquery.git
Step #11:  ! [remote rejected] update-discovery-patch -> update-discovery-patch (refusing to allow a GitHub App to create or update workflow `.github/workflows/ci.yaml` without `workflows` permission)
```
## Description

This PR achieves the same objectives as https://togithub.com/googleapis/java-bigquery/pull/4010, but for Node as requested in [the planning sheet](https://docs.google.com/spreadsheets/d/1cHAw6cV8k_s40hw28C8STtlymu3MXEvTY6PaKgdgSGE/edit?resourcekey=0-hPyTawvew5ugN037XCfZXg&gid=0#gid=0). The idea is that for reading rows, the users should be able to access high precision values for timestamps if high precision values are being stored on the backend.

## Impact

This PR follows a test driven development approach against the getRows method.

Tests were written to evaluate what happens when getRows receives various input values for timestampOutputFormat and useInt64Timestamp. These tests revealed that not only are high precision values not being delivered to users for ISO8601_STRING return types, but also other bugs exist like calls hang on getRows calls that fail and conversion logic throughs errors for some calls that fetch rows. This PR fixes all the bugs and ensures the values with the right precision are delivered to users.

This chart details the before code changes / after code changes results with impact highlighted in green:

<img width="1575" height="383" alt="image" src="https://togithub.com/user-attachments/assets/75c1ff70-073c-477e-9363-8eff5be0aa5f" />

The highlighted green impact shows that conversion logic has been updated to avoid the  'cannot convert' errors and with this new logic changes are also applied to the BigQueryTimestamp class to maintain high precision on timestamp values returned to users.

## Testing

New system tests to capture all useInt64Timestamp/timestampOutputFormat combinations for getRows calls.
@snippet-bot
Copy link

snippet-bot bot commented Feb 3, 2026

Here is the summary of changes.

You are about to add 116 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

@sofisl sofisl added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 4, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 4, 2026
@sofisl sofisl added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 4, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 4, 2026
@sofisl sofisl merged commit 2d927b8 into main Feb 4, 2026
9 of 14 checks passed
@sofisl sofisl deleted the nodejs-bigquery-migration branch February 4, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery: missing useLegacySql option