From 0d433c81342b0c474e20a6fa3b29b2641983ecf3 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Tue, 28 Nov 2023 14:09:59 -0600 Subject: [PATCH] Fix zero-scale floor and ceil tests Signed-off-by: Jason Lowe --- .../src/main/python/arithmetic_ops_test.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/integration_tests/src/main/python/arithmetic_ops_test.py b/integration_tests/src/main/python/arithmetic_ops_test.py index e182a0433b9..97d7cb153cb 100644 --- a/integration_tests/src/main/python/arithmetic_ops_test.py +++ b/integration_tests/src/main/python/arithmetic_ops_test.py @@ -587,17 +587,15 @@ def test_floor(data_gen): assert_gpu_and_cpu_are_equal_collect( lambda spark : unary_op_df(spark, data_gen).selectExpr('floor(a)')) -@datagen_overrides(seed=0, reason='https://github.com/NVIDIA/spark-rapids/issues/9722') @pytest.mark.skipif(is_before_spark_330(), reason='scale parameter in Floor function is not supported before Spark 3.3.0') -@pytest.mark.parametrize('data_gen', double_n_long_gens + _arith_decimal_gens_no_neg_scale, ids=idfn) +@pytest.mark.parametrize('data_gen', [long_gen] + _arith_decimal_gens_no_neg_scale, ids=idfn) def test_floor_scale_zero(data_gen): assert_gpu_and_cpu_are_equal_collect( - lambda spark : unary_op_df(spark, data_gen).selectExpr('floor(a, 0)'), - conf={'spark.rapids.sql.castFloatToDecimal.enabled':'true'}) + lambda spark : unary_op_df(spark, data_gen).selectExpr('floor(a, 0)')) @pytest.mark.skipif(is_before_spark_330(), reason='scale parameter in Floor function is not supported before Spark 3.3.0') @allow_non_gpu('ProjectExec') -@pytest.mark.parametrize('data_gen', double_n_long_gens + _arith_decimal_gens_no_neg_scale_38_0_overflow, ids=idfn) +@pytest.mark.parametrize('data_gen', [long_gen] + _arith_decimal_gens_no_neg_scale_38_0_overflow, ids=idfn) def test_floor_scale_nonzero(data_gen): assert_gpu_fallback_collect( lambda spark : unary_op_df(spark, data_gen).selectExpr('floor(a, -1)'), 'RoundFloor') @@ -607,13 +605,11 @@ def test_ceil(data_gen): assert_gpu_and_cpu_are_equal_collect( lambda spark : unary_op_df(spark, data_gen).selectExpr('ceil(a)')) -@datagen_overrides(seed=0, reason='https://github.com/NVIDIA/spark-rapids/issues/9846') @pytest.mark.skipif(is_before_spark_330(), reason='scale parameter in Ceil function is not supported before Spark 3.3.0') -@pytest.mark.parametrize('data_gen', double_n_long_gens + _arith_decimal_gens_no_neg_scale, ids=idfn) +@pytest.mark.parametrize('data_gen', [long_gen] + _arith_decimal_gens_no_neg_scale, ids=idfn) def test_ceil_scale_zero(data_gen): assert_gpu_and_cpu_are_equal_collect( - lambda spark : unary_op_df(spark, data_gen).selectExpr('ceil(a, 0)'), - conf={'spark.rapids.sql.castFloatToDecimal.enabled':'true'}) + lambda spark : unary_op_df(spark, data_gen).selectExpr('ceil(a, 0)')) @pytest.mark.parametrize('data_gen', [_decimal_gen_36_neg5, _decimal_gen_38_neg10], ids=idfn) def test_floor_ceil_overflow(data_gen):