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

Commit b7bd724

Browse files
committed
improve e2e tests
1 parent a508ddb commit b7bd724

2 files changed

Lines changed: 21 additions & 53 deletions

File tree

tests/system/pipeline_e2e/logical.yaml

Lines changed: 19 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -238,22 +238,15 @@ tests:
238238
expression:
239239
fieldReferenceValue: title
240240
name: sort
241-
- description: testChecks
241+
- description: testIsNotNull
242242
pipeline:
243243
- Collection: books
244244
- Where:
245-
- Not:
246-
- Function.is_nan:
247-
- Field: rating
248-
- Select:
249-
- AliasedExpression:
250-
- Not:
251-
- Function.is_nan:
252-
- Field: rating
253-
- "ratingIsNotNaN"
254-
- Limit: 1
255-
assert_results:
256-
- ratingIsNotNaN: true
245+
- Not:
246+
- Function.equal:
247+
- Field: rating
248+
- null
249+
assert_count: 10
257250
assert_proto:
258251
pipeline:
259252
stages:
@@ -266,49 +259,18 @@ tests:
266259
- functionValue:
267260
args:
268261
- fieldReferenceValue: rating
269-
name: is_nan
262+
- nullValue: null
263+
name: equal
270264
name: not
271265
name: where
272-
- args:
273-
- mapValue:
274-
fields:
275-
ratingIsNotNaN:
276-
functionValue:
277-
args:
278-
- functionValue:
279-
args:
280-
- fieldReferenceValue: rating
281-
name: is_nan
282-
name: not
283-
name: select
284-
- args:
285-
- integerValue: '1'
286-
name: limit
287-
- description: testIsNotNull
266+
- description: testIsNotNan
288267
pipeline:
289268
- Collection: books
290269
- Where:
291-
- Function.is_not_null:
292-
- Field: rating
293-
assert_count: 10
294-
assert_proto:
295-
pipeline:
296-
stages:
297-
- args:
298-
- referenceValue: /books
299-
name: collection
300-
- args:
301-
- functionValue:
302-
args:
303-
- fieldReferenceValue: rating
304-
name: is_not_null
305-
name: where
306-
- description: testIsNotNaN
307-
pipeline:
308-
- Collection: books
309-
- Where:
310-
- Function.is_not_nan:
311-
- Field: rating
270+
- Not:
271+
- Function.equal:
272+
- Field: rating
273+
- NaN
312274
assert_count: 10
313275
assert_proto:
314276
pipeline:
@@ -319,8 +281,12 @@ tests:
319281
- args:
320282
- functionValue:
321283
args:
322-
- fieldReferenceValue: rating
323-
name: is_not_nan
284+
- functionValue:
285+
args:
286+
- fieldReferenceValue: rating
287+
- doubleValue: NaN
288+
name: equal
289+
name: not
324290
name: where
325291
- description: testIsAbsent
326292
pipeline:

tests/system/test_pipeline_acceptance.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ def _parse_expressions(client, yaml_element: Any):
270270
}
271271
elif _is_expr_string(yaml_element):
272272
return getattr(pipeline_expressions, yaml_element)()
273+
elif yaml_element == 'NaN':
274+
return float(yaml_element)
273275
else:
274276
return yaml_element
275277

0 commit comments

Comments
 (0)