You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2022/04/07 16:39:23 UTC

[impala] branch master updated: IMPALA-11230: Add test for crash in partitioned Top-N codegen code

This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b235eebd IMPALA-11230: Add test for crash in partitioned Top-N codegen code
7b235eebd is described below

commit 7b235eebd5dda9074e2b7724e6b290f49c1bb8ce
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Wed Apr 6 14:41:18 2022 -0700

    IMPALA-11230: Add test for crash in partitioned Top-N codegen code
    
    User workloads hit a crash for certain queries that
    use partitioned Top-N operators. The crash occurred
    only when codegen is enabled. After investigation,
    the crash was due to a nullptr being passed into
    TupleRowComparator::Compare(). The issue was fixed
    as part of IMPALA-10961.
    
    This adds a test case with a SQL statement that
    triggers a crash if IMPALA-10961 is not present.
    
    Change-Id: I6909ef660b01ad3d301273deb8a8c31120445f79
    Reviewed-on: http://gerrit.cloudera.org:8080/18389
    Reviewed-by: Aman Sinha <am...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 .../QueryTest/analytic-fns-tpcds-partitioned-topn.test     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/testdata/workloads/functional-query/queries/QueryTest/analytic-fns-tpcds-partitioned-topn.test b/testdata/workloads/functional-query/queries/QueryTest/analytic-fns-tpcds-partitioned-topn.test
index 87b1110a1..8cbaac883 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/analytic-fns-tpcds-partitioned-topn.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/analytic-fns-tpcds-partitioned-topn.test
@@ -323,3 +323,17 @@ STRING, STRING, STRING, STRING, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DEC
 # Confirm that heaps were actually evicted due to memory pressure.
 row_regex: .*InMemoryHeapsEvicted: .* \([1-9][0-9]*\)
 ====
+---- QUERY
+# IMPALA-11230: This is a minimal reproducing case for a crash in
+# partitioned top-n codegen. This query requires a valid ScalarExprEvaluator
+# in the TupleRowComparator::Compare() call. This was fixed by IMPALA-10961.
+select count(*)
+from (
+  select row_number() OVER (PARTITION BY ss_sold_date_sk ORDER BY CASE WHEN ss_promo_sk IN (101, 84) THEN 1 ELSE 0 END DESC) RN
+  from tpcds.store_sales) c
+where c.rn = 1;
+---- RESULTS
+1824
+---- TYPES
+BIGINT
+====
\ No newline at end of file