Skip to content

Commit

Permalink
Fix problems with nulls in sequence tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Lowe <[email protected]>
  • Loading branch information
jlowe committed Nov 27, 2023
1 parent d8b0a41 commit cc2a00a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions integration_tests/src/main/python/collection_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ def test_sequence_with_step(start_gen, stop_gen, step_gen):
# Get a step scalar from the 'step_gen' which follows the rules.
step_gen.start(random.Random(data_gen_seed))
step_lit = step_gen.gen()
if step_lit is None:
step_lit = "null"
assert_gpu_and_cpu_are_equal_collect(
lambda spark: three_col_df(spark, start_gen, stop_gen, step_gen).selectExpr(
"sequence(a, b, c)",
Expand Down Expand Up @@ -327,8 +329,8 @@ def test_sequence_illegal_boundaries(start_gen, stop_gen, step_gen):
# Exceed the max length of a sequence
# "Too long sequence: xxxxxxxxxx. Should be <= 2147483632"
sequence_too_long_length_gens = [
IntegerGen(min_val=2147483633, max_val=2147483633, special_cases=[]),
LongGen(min_val=2147483635, max_val=2147483635, special_cases=[None])
IntegerGen(min_val=2147483633, max_val=2147483633, special_cases=[], nullable=False),
LongGen(min_val=2147483635, max_val=2147483635, special_cases=[], nullable=False)
]

@pytest.mark.parametrize('stop_gen', sequence_too_long_length_gens, ids=idfn)
Expand Down

0 comments on commit cc2a00a

Please sign in to comment.