mirror of
https://github.com/apache/impala.git
synced 2025-12-30 21:02:41 -05:00
We need to check for AllocateLocal() returning NULL. CopyFrom() takes care of that for us. Also adjust a few other places in the code base that didn't have the check. The new test reproduces the crash, but in order to get this test file to execute, I had to move the xfail to be a function decorator. Apparently xfail as a statement causes the test to not run at all. We should run all of these queries even if they are non-determistic to at least verify that impalad does not crash. Change-Id: Iafefef24479164cc4d2b99191d2de28eb8b311b6 Reviewed-on: http://gerrit.cloudera.org:8080/6761 Reviewed-by: Dan Hecht <dhecht@cloudera.com> Tested-by: Impala Public Jenkins
62 lines
1.8 KiB
Plaintext
62 lines
1.8 KiB
Plaintext
====
|
|
---- QUERY
|
|
# Due to somewhat non-determinstic way memory allocation happens in Impala now,
|
|
# we will just check to make sure the exception is a memory allocation failure.
|
|
select group_concat(l_comment) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
select min(l_comment) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
select max(l_comment) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
select rank() over (partition by l_orderkey order by l_commitdate) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
select first_value(l_comment) over (partition by l_orderkey order by l_commitdate) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
select last_value(l_comment) over (partition by l_orderkey order by l_commitdate) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
select cast(l_comment as char(120)) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
# This aims to exercise malloc() failure in the Serialize() function of appx_median() but
|
|
# allocation can sometimes fail in the Init() functions as well.
|
|
select appx_median(l_quantity), appx_median(l_discount) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
# This aims to exercise malloc() failure in the Serialize() functions of distinctpc() and
|
|
# ndv() but allocation can sometimes fail in the Init() functions as well.
|
|
select ndv(l_partkey), distinctpc(l_suppkey) from tpch.lineitem
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|
|
---- QUERY
|
|
# IMPALA-5252: Verify HiveUdfCall allocations are checked.
|
|
create function replace_string(string) returns string
|
|
location '$FILESYSTEM_PREFIX/test-warehouse/impala-hive-udfs.jar'
|
|
symbol='org.apache.impala.ReplaceStringUdf';
|
|
select replace_string(l_comment) from tpch.lineitem limit 10;
|
|
---- CATCH
|
|
failed to allocate
|
|
====
|