firestore: Query with '!=' operator for nil/NaN returns incorrect results #11639
Labels
api: firestore
Issues related to the Firestore API.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
Firestore
Environment
go 1.24
Code and Dependencies
go.mod
Expected behavior
The query should return all documents where "field" IS NOT NULL or "field" IS NOT NaN.
Actual behavior
The query behaves as if it were == nil, returning only documents where "field" IS NULL.
Additional context
This issue started after a recent commit that introduced support for != nil. The implementation does not properly map != nil and != NaN to their correct Firestore query representations (IS_NOT_NULL and IS_NOT_NAN).
PR: #11112
Proposed Fix
Modify the toProto function in
PropertyPathFilter
struct as follows:The text was updated successfully, but these errors were encountered: