Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Commit f156d45

Browse files
committed
use actual nan and null fields for tests
1 parent b7bd724 commit f156d45

3 files changed

Lines changed: 29 additions & 29 deletions

File tree

tests/system/pipeline_e2e/data.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,9 @@ data:
139139
vec3:
140140
embedding: [5.0, 6.0, 7.0]
141141
vec4:
142-
embedding: [1.0, 2.0, 4.0]
142+
embedding: [1.0, 2.0, 4.0]
143+
errors:
144+
doc_with_nan:
145+
value: "NaN"
146+
doc_with_null:
147+
value: null

tests/system/pipeline_e2e/logical.yaml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -238,55 +238,48 @@ tests:
238238
expression:
239239
fieldReferenceValue: title
240240
name: sort
241-
- description: testIsNotNull
241+
- description: testIsNull
242242
pipeline:
243-
- Collection: books
243+
- Collection: errors
244244
- Where:
245-
- Not:
246-
- Function.equal:
247-
- Field: rating
248-
- null
249-
assert_count: 10
245+
- Function.equal:
246+
- Field: value
247+
- null
248+
assert_results:
249+
- value: null
250250
assert_proto:
251251
pipeline:
252252
stages:
253253
- args:
254-
- referenceValue: /books
254+
- referenceValue: /errors
255255
name: collection
256256
- args:
257257
- functionValue:
258258
args:
259-
- functionValue:
260-
args:
261-
- fieldReferenceValue: rating
262-
- nullValue: null
263-
name: equal
264-
name: not
259+
- fieldReferenceValue: value
260+
- nullValue: null
261+
name: equal
265262
name: where
266-
- description: testIsNotNan
263+
- description: testIsNan
267264
pipeline:
268-
- Collection: books
265+
- Collection: errors
269266
- Where:
270-
- Not:
271-
- Function.equal:
272-
- Field: rating
273-
- NaN
274-
assert_count: 10
267+
- Function.equal:
268+
- Field: value
269+
- NaN
270+
assert_count: 1
275271
assert_proto:
276272
pipeline:
277273
stages:
278274
- args:
279-
- referenceValue: /books
275+
- referenceValue: /errors
280276
name: collection
281277
- args:
282278
- functionValue:
283279
args:
284-
- functionValue:
285-
args:
286-
- fieldReferenceValue: rating
287-
- doubleValue: NaN
288-
name: equal
289-
name: not
280+
- fieldReferenceValue: value
281+
- doubleValue: NaN
282+
name: equal
290283
name: where
291284
- description: testIsAbsent
292285
pipeline:

tests/system/test_pipeline_acceptance.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ def _parse_yaml_types(data):
353353
return parsed_datetime
354354
except ValueError:
355355
pass
356+
if data == "NaN":
357+
return float("NaN")
356358
return data
357359

358360

0 commit comments

Comments
 (0)