Skip to content

feat(firestore): add BSONMinKey and BSONMaxKey support - #18385

Merged
ohmayr merged 1 commit into
mainfrom
bson-pr1b-minkey-maxkey
Sep 16, 2026
Merged

ohmayr merged 1 commit into
mainfrom
bson-pr1b-minkey-maxkey

Conversation

@ohmayr

@ohmayr ohmayr commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This PR adds write support for BSON MinKey and MaxKey query range boundary sentinels in Cloud Firestore Enterprise databases.

  • BSONMinKey: Sentinel representing the lowest possible value in BSON sort order, serializing to {"__min__": None}.
  • BSONMaxKey: Sentinel representing the highest possible value in BSON sort order, serializing to {"__max__": None}.

Fixes b/562164019 🦕

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the BSONMinKey and BSONMaxKey classes to the google-cloud-firestore package, representing BSON MinKey and MaxKey sentinel values for query range boundaries. These classes are exposed in the package's public interface and include serialization, representation, equality, hashing, copying, and pickling capabilities. Additionally, comprehensive unit and system tests (both synchronous and asynchronous) have been added to verify their behavior. There are no review comments provided, so no further feedback is necessary.

@ohmayr
ohmayr marked this pull request as ready for review September 15, 2026 23:39
@ohmayr
ohmayr requested a review from a team as a code owner September 15, 2026 23:39
@ohmayr
ohmayr added this pull request to stack #18386 September 15, 2026 23:51
@ohmayr
ohmayr force-pushed the bson-pr1b-minkey-maxkey branch from ed57926 to 8ce8b10 Compare September 16, 2026 00:10
@ohmayr
ohmayr requested a review from a team as a code owner September 16, 2026 00:10
@ohmayr
ohmayr force-pushed the bson-pr1b-minkey-maxkey branch from 8ce8b10 to 173e2e0 Compare September 16, 2026 00:21
Comment thread packages/google-cloud-firestore/google/cloud/firestore_v1/bson.py Outdated
Comment thread packages/google-cloud-firestore/google/cloud/firestore_v1/bson.py Outdated
Comment thread packages/google-cloud-firestore/google/cloud/firestore_v1/bson.py Outdated
Comment thread packages/google-cloud-firestore/google/cloud/firestore_v1/bson.py
@ohmayr
ohmayr force-pushed the bson-pr1b-minkey-maxkey branch 2 times, most recently from b10b328 to 173e2e0 Compare September 16, 2026 01:57
@ohmayr
ohmayr force-pushed the bson-pr1b-minkey-maxkey branch from 173e2e0 to c583e2e Compare September 16, 2026 02:01
@ohmayr
ohmayr force-pushed the bson-pr1b-minkey-maxkey branch from c583e2e to edd355d Compare September 16, 2026 02:08

@daniel-sanche daniel-sanche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from bson-pr1a-framework-objectid to main September 16, 2026 07:43
@ohmayr
ohmayr force-pushed the bson-pr1b-minkey-maxkey branch from edd355d to 8a5c3ba Compare September 16, 2026 07:43
@ohmayr
ohmayr merged commit 9a1fb24 into main Sep 16, 2026
48 checks passed
@ohmayr
ohmayr deleted the bson-pr1b-minkey-maxkey branch September 16, 2026 08:07
@release-please release-please Bot mentioned this pull request Sep 16, 2026
zhumin8 pushed a commit that referenced this pull request Sep 17, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>google-ads-admanager: 0.10.5</summary>

##
[0.10.5](google-ads-admanager-v0.10.4...google-ads-admanager-v0.10.5)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-ads-datamanager: 0.9.3</summary>

##
[0.9.3](google-ads-datamanager-v0.9.2...google-ads-datamanager-v0.9.3)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-analytics-data: 0.23.1</summary>

##
[0.23.1](google-analytics-data-v0.23.0...google-analytics-data-v0.23.1)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-api-core: 2.38.0</summary>

##
[2.38.0](google-api-core-v2.37.0...google-api-core-v2.38.0)
(2026-09-17)


### Features

* **core:** add request hook to enrich T4 network spans with GCP
resource attributes (E)
([#18272](#18272))
([1ca95e9](1ca95e9))
</details>

<details><summary>google-apps-meet: 0.5.1</summary>

##
[0.5.1](google-apps-meet-v0.5.0...google-apps-meet-v0.5.1)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-api-gateway: 1.17.0</summary>

##
[1.17.0](google-cloud-api-gateway-v1.16.0...google-cloud-api-gateway-v1.17.0)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-auditmanager: 0.3.2</summary>

##
[0.3.2](google-cloud-auditmanager-v0.3.1...google-cloud-auditmanager-v0.3.2)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-backupdr: 0.10.2</summary>

##
[0.10.2](google-cloud-backupdr-v0.10.1...google-cloud-backupdr-v0.10.2)
(2026-09-17)


### Features

* **google/cloud/backupdr/v1beta:** add google-cloud-backupdr
([#18399](#18399))
([91b7ae7](91b7ae7))
</details>

<details><summary>google-cloud-bigquery: 3.45.2</summary>

##
[3.45.2](google-cloud-bigquery-v3.45.1...google-cloud-bigquery-v3.45.2)
(2026-09-17)


### Bug Fixes

* disambiguate google-cloud-bigquery `to_dataframe` usage from
`pandas-gbq` in ua.
([#18369](#18369))
([0d7d59c](0d7d59c))
</details>

<details><summary>google-cloud-bigtable: 2.46.0</summary>

##
[2.46.0](google-cloud-bigtable-v2.45.0...google-cloud-bigtable-v2.46.0)
(2026-09-17)


### Features

* **bigtable:** Rerouted RowSet and RowRange to use ReadRows from data
client
([#18196](#18196))
([1857302](1857302))
* Rerouted ReadRows to data client
([#18198](#18198))
([934cd2d](934cd2d))
* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))


### Bug Fixes

* **bigtable:** Added rst_stream exception handling for ReadRows.
([#18197](#18197))
([f30df60](f30df60))
</details>

<details><summary>google-cloud-compute: 1.54.0</summary>

##
[1.54.0](google-cloud-compute-v1.53.0...google-cloud-compute-v1.54.0)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-compute-v1beta: 0.12.6</summary>

##
[0.12.6](google-cloud-compute-v1beta-v0.12.5...google-cloud-compute-v1beta-v0.12.6)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-devicestreaming: 0.5.1</summary>

##
[0.5.1](google-cloud-devicestreaming-v0.5.0...google-cloud-devicestreaming-v0.5.1)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-discoveryengine: 0.20.4</summary>

##
[0.20.4](google-cloud-discoveryengine-v0.20.3...google-cloud-discoveryengine-v0.20.4)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-firestore: 2.31.0</summary>

##
[2.31.0](google-cloud-firestore-v2.30.0...google-cloud-firestore-v2.31.0)
(2026-09-17)


### Features

* **firestore:** add BSONInt32 support
([#18388](#18388))
([136d4b9](136d4b9))
* **firestore:** add BSONMinKey and BSONMaxKey support
([#18385](#18385))
([9a1fb24](9a1fb24))
</details>

<details><summary>google-cloud-kms: 3.17.0</summary>

##
[3.17.0](google-cloud-kms-v3.16.0...google-cloud-kms-v3.17.0)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-network-services: 0.10.3</summary>

##
[0.10.3](google-cloud-network-services-v0.10.2...google-cloud-network-services-v0.10.3)
(2026-09-17)


### Features

* **google/cloud/networkservices/v1beta1:** add
google-cloud-network-services
([#18398](#18398))
([8df34ce](8df34ce))


### Bug Fixes

* empty commit to bump v1beta version
([#18411](#18411))
([3b3cc6f](3b3cc6f))
</details>

<details><summary>google-cloud-pubsub: 2.41.0</summary>

##
[2.41.0](google-cloud-pubsub-v2.40.0...google-cloud-pubsub-v2.41.0)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-cloud-securesourcemanager: 0.6.2</summary>

##
[0.6.2](google-cloud-securesourcemanager-v0.6.1...google-cloud-securesourcemanager-v0.6.2)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

<details><summary>google-maps-solar: 0.6.1</summary>

##
[0.6.1](google-maps-solar-v0.6.0...google-maps-solar-v0.6.1)
(2026-09-17)


### Features

* update API sources and regenerate
([#18396](#18396))
([e9f8e59](e9f8e59))
* update API sources and regenerate.
([e9f8e59](e9f8e59))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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.

2 participants