From ff003c4cd8b4d87c679cd7ac1ad41545de275a16 Mon Sep 17 00:00:00 2001 From: MithunR Date: Tue, 2 Jan 2024 14:49:07 -0800 Subject: [PATCH] Fix `test_window_aggs_for_batched_finite_row_windows_partitioned` failure. Fixes #10134. This commit fixes test failures in `test_window_aggs_for_batched_finite_row_windows_partitioned`, resulting from ambiguous ordering in the window function input. The failing tests partition by `a`, and order by `b,c`. When the values of `b,c` have repeated values, the results from the window function execution is indeterminate. This commit changes the definition of the aggregation column `c` (that's also included in the order-by clause), to use unique long values. This guarantees deterministic output. Signed-off-by: MithunR --- .../src/main/python/window_function_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/integration_tests/src/main/python/window_function_test.py b/integration_tests/src/main/python/window_function_test.py index 47e730136b5..39c7018a2e7 100644 --- a/integration_tests/src/main/python/window_function_test.py +++ b/integration_tests/src/main/python/window_function_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -93,30 +93,30 @@ ('a', RepeatSeqGen(int_gen, length=20)), # restrict the values generated by min_val/max_val not to be overflow when calculating ('b', ByteGen(nullable=True, min_val=-98, max_val=98, special_cases=[])), - ('c', IntegerGen())] + ('c', UniqueLongGen())] _grpkey_short_with_nulls = [ ('a', RepeatSeqGen(int_gen, length=20)), # restrict the values generated by min_val/max_val not to be overflow when calculating ('b', ShortGen(nullable=True, min_val=-32700, max_val=32700, special_cases=[])), - ('c', IntegerGen())] + ('c', UniqueLongGen())] _grpkey_int_with_nulls = [ ('a', RepeatSeqGen(int_gen, length=20)), # restrict the values generated by min_val/max_val not to be overflow when calculating ('b', IntegerGen(nullable=True, min_val=-2147483000, max_val=2147483000, special_cases=[])), - ('c', IntegerGen())] + ('c', UniqueLongGen())] _grpkey_long_with_nulls = [ ('a', RepeatSeqGen(int_gen, length=20)), # restrict the values generated by min_val/max_val not to be overflow when calculating ('b', LongGen(nullable=True, min_val=-9223372036854775000, max_val=9223372036854775000, special_cases=[])), - ('c', IntegerGen())] + ('c', UniqueLongGen())] _grpkey_date_with_nulls = [ ('a', RepeatSeqGen(int_gen, length=20)), ('b', DateGen(nullable=(True, 5.0), start=date(year=2020, month=1, day=1), end=date(year=2020, month=12, day=31))), - ('c', IntegerGen())] + ('c', UniqueLongGen())] _grpkey_byte_with_nulls_with_overflow = [ ('a', IntegerGen()),