MCPcopy Create free account
hub / github.com/apache/arrow / test_rejects_none

Function test_rejects_none

python/pyarrow/tests/test_gandiva.py:397–434  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

395
396@pytest.mark.gandiva
397def test_rejects_none():
398 import pyarrow.gandiva as gandiva
399
400 builder = gandiva.TreeExprBuilder()
401
402 field_x = pa.field('x', pa.int32())
403 schema = pa.schema([field_x])
404 literal_true = builder.make_literal(True, pa.bool_())
405
406 with pytest.raises(TypeError):
407 builder.make_field(None)
408
409 with pytest.raises(TypeError):
410 builder.make_if(literal_true, None, None, None)
411
412 with pytest.raises(TypeError):
413 builder.make_and([literal_true, None])
414
415 with pytest.raises(TypeError):
416 builder.make_or([None, literal_true])
417
418 with pytest.raises(TypeError):
419 builder.make_in_expression(None, [1, 2, 3], pa.int32())
420
421 with pytest.raises(TypeError):
422 builder.make_expression(None, field_x)
423
424 with pytest.raises(TypeError):
425 builder.make_condition(None)
426
427 with pytest.raises(TypeError):
428 builder.make_function('less_than', [literal_true, None], pa.bool_())
429
430 with pytest.raises(TypeError):
431 gandiva.make_projector(schema, [None])
432
433 with pytest.raises(TypeError):
434 gandiva.make_filter(schema, None)

Callers

nothing calls this directly

Calls 2

fieldMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected