mirror of
https://github.com/apache/impala.git
synced 2025-12-26 14:02:53 -05:00
test_sort.py declared 'max_sort_run_size' query option, but it silently did not exercise it. Fixing the query option declaration in IMPALA-13349 using helper function add_exec_option_dimension() revealed a DCHECK failure in sorter.cc. In some cases the length of an in-memory run could exceed 'max_sort_run_size' by 1 page. This patch fixed the DCHECK failure by strictly enforcing the 'max_sort_run_size' limit. Memory limits were also adjusted in test_sort.py according to the memory usage of the different sort run sizes. Additionally, the 'MAX_SORT_RUN_SIZE' query option's valid range was relaxed. Instead of throwing an error, negative values also disable the run size limitation, just as the default: '0'. Testing: - E2E tests in sort.py - set test Change-Id: I943d8edcc87df168448a174d6c9c6b46fe960eae Reviewed-on: http://gerrit.cloudera.org:8080/21777 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>