Closed
Description
Bug report
I have a query that tries to retrieve documents with a (date) field that has a null value.
const query = FirebaseFirestore.instance.collection("77468864").where("date", isEqualTo: null);
var snapshot = await query.get();
print('Got snapshot with ${snapshot.size} documents');
The Flutter code (when run on web, I didn't test other platforms) incorrectly returns documents with an actual date value, while the corresponding JavaScript code does not return these documents.
Steps to reproduce
- I have a collection with one document that has two fields (
date
andstring
), both of which have a value. - Go to https://zapp.run/edit/firestore-query-null-date-zr1q06yyr1r0
- Check the log output to see that the code returns a document with a non-null
date
field - Go to https://stackblitz.com/edit/firestore-v9-query-null-date?file=index.js
- Check the log output to see that the code returns no documents
Expected behavior
I expect the Flutter and JavaScript projects to show the same result, given that they run an equivalent query on the same data.
Additional context
Originally reported here: https://stackoverflow.com/q/77468864