From 1ba105e9d1dcfcfbdd4ffc31c1f55b973a7f68a2 Mon Sep 17 00:00:00 2001 From: Alessandro Bellina Date: Thu, 3 Jun 2021 22:40:37 -0500 Subject: [PATCH] Change test_single_sort_in_part to print source data frame on failure (#2571) * Change test_single_sort_in_part to print source data frame on failure Signed-off-by: Alessandro Bellina * Simplify test change * Add a comment pointing to the github issue * debug_df can be easily chained in place of a source dataframe --- integration_tests/src/main/python/sort_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/integration_tests/src/main/python/sort_test.py b/integration_tests/src/main/python/sort_test.py index 1e78921994c..e5bd7f85e30 100644 --- a/integration_tests/src/main/python/sort_test.py +++ b/integration_tests/src/main/python/sort_test.py @@ -105,10 +105,11 @@ def test_single_nested_orderby_with_limit(data_gen, order): @pytest.mark.parametrize('data_gen', orderable_gens + orderable_not_null_gen, ids=idfn) @pytest.mark.parametrize('order', [f.col('a').asc(), f.col('a').asc_nulls_last(), f.col('a').desc(), f.col('a').desc_nulls_first()], ids=idfn) def test_single_sort_in_part(data_gen, order): + # This outputs the source data frame each time to debug intermittent test + # failures as documented here: https://github.com/NVIDIA/spark-rapids/issues/2477 assert_gpu_and_cpu_are_equal_collect( - lambda spark : unary_op_df(spark, data_gen).sortWithinPartitions(order), - conf = allow_negative_scale_of_decimal_conf) - + lambda spark : debug_df(unary_op_df(spark, data_gen)).sortWithinPartitions(order), + conf = allow_negative_scale_of_decimal_conf) @pytest.mark.parametrize('data_gen', [all_basic_struct_gen], ids=idfn) @pytest.mark.parametrize('order', [