mirror of
https://github.com/apache/impala.git
synced 2025-12-30 12:02:10 -05:00
Impala has a hardcoded limit of 1GB in size for StringVal. If the length of the string exceeds 1GB, Impala will simply mark the StringVal as NULL (i.e. is_null = true). It's important that string functions or built-in UDFs check this field before accessing the pointer or Impala may end up doing null pointer access, leading to crashes. Change-Id: I55777487fff15a521818e39b4f93a8a242770ec2 Reviewed-on: http://gerrit.cloudera.org:8080/2786 Reviewed-by: Dan Hecht <dhecht@cloudera.com> Tested-by: Internal Jenkins
194 lines
8.1 KiB
Plaintext
194 lines
8.1 KiB
Plaintext
====
|
|
---- QUERY
|
|
# IMPALA-1619 group_concat() error
|
|
select length(group_concat(l_comment, "!")) from (
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem) a
|
|
---- CATCH
|
|
Concatenated string length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
# IMPALA-2620: Allocation by UDF/UDA need to take into account of memory limit.
|
|
SET mem_limit=512m;
|
|
select length(group_concat(l_comment, "!")) from (
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem union all
|
|
select l_comment from tpch_parquet.lineitem) a
|
|
---- CATCH
|
|
Memory limit exceeded
|
|
====
|
|
---- QUERY
|
|
#IMPALA-3350: Results of string functions can exceed 1GB.
|
|
select length(concat_ws(',', s, s, s, s)) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select length(repeat(s, 10)) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select length(lpad(s, 1073741830, '!')) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select length(rpad(s, 1073741830, '~')) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select space(1073741830);
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select length(regexp_replace(s, '.', '++++++++')) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select trunc(timestamp_col, space(1073741830)) from functional.alltypes
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select extract(timestamp_col, space(1073741830)) from functional.alltypes
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select length(madlib_encode_vector(concat_ws(',', s, s, s, s))) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|
|
---- QUERY
|
|
select length(madlib_decode_vector(concat_ws(',', s, s, s, s))) from (
|
|
select group_concat(l_comment, "!") s from (
|
|
select l_comment from tpch.lineitem union all
|
|
select l_comment from tpch.lineitem) t1
|
|
) t2
|
|
---- CATCH
|
|
String length larger than allowed limit of 1 GB character data
|
|
=====
|