@@ -390,3 +390,36 @@ def test_engines_invert_op(scalars_array_value: array_value.ArrayValue, engine):
390
390
)
391
391
392
392
assert_equivalence_execution (arr .node , REFERENCE_ENGINE , engine )
393
+
394
+
395
+ @pytest .mark .parametrize ("engine" , ["polars" , "bq" ], indirect = True )
396
+ def test_engines_isin_op (scalars_array_value : array_value .ArrayValue , engine ):
397
+ arr , col_ids = scalars_array_value .compute_values (
398
+ [
399
+ ops .IsInOp ((1 , 2 , 3 )).as_expr (expression .deref ("int64_col" )),
400
+ ops .IsInOp ((None , 123456 )).as_expr (expression .deref ("int64_col" )),
401
+ ops .IsInOp ((None , 123456 ), match_nulls = False ).as_expr (
402
+ expression .deref ("int64_col" )
403
+ ),
404
+ ops .IsInOp ((1.0 , 2.0 , 3.0 )).as_expr (expression .deref ("int64_col" )),
405
+ ops .IsInOp (("1.0" , "2.0" )).as_expr (expression .deref ("int64_col" )),
406
+ ops .IsInOp (("1.0" , 2.5 , 3 )).as_expr (expression .deref ("int64_col" )),
407
+ ops .IsInOp (()).as_expr (expression .deref ("int64_col" )),
408
+ ops .IsInOp ((1 , 2 , 3 , None )).as_expr (expression .deref ("float64_col" )),
409
+ ]
410
+ )
411
+ new_names = (
412
+ "int in ints" ,
413
+ "int in ints w null" ,
414
+ "int in ints w null wo match nulls" ,
415
+ "int in floats" ,
416
+ "int in strings" ,
417
+ "int in mixed" ,
418
+ "int in empty" ,
419
+ "float in ints" ,
420
+ )
421
+ arr = arr .rename_columns (
422
+ {old_name : new_names [i ] for i , old_name in enumerate (col_ids )}
423
+ )
424
+
425
+ assert_equivalence_execution (arr .node , REFERENCE_ENGINE , engine )
0 commit comments