mirror of
https://github.com/apache/impala.git
synced 2026-02-02 15:00:38 -05:00
We have been using rapidjson to print structs but didn't use it to print
collections (arrays and maps).
This change introduces the usage of rapidjson to print collections for
both the HS2 and the Beeswax protocol.
The old code handling the printing of collections in raw-value.{h,cc} is
removed.
Testing:
- Ran existing EE tests
- Added EE tests with non-string and NULL map keys in
nested-map-in-select-list.test and map_null_keys.test.
Change-Id: I08a2d596a498fbbaf1419b18284846b992f49165
Reviewed-on: http://gerrit.cloudera.org:8080/19309
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Daniel Becker <daniel.becker@cloudera.com>
25 lines
816 B
Plaintext
25 lines
816 B
Plaintext
=====
|
|
---- QUERY
|
|
-- Test that NULL map keys are printed correctly.
|
|
set CONVERT_LEGACY_HIVE_PARQUET_UTC_TIMESTAMPS=1;
|
|
select
|
|
id,
|
|
map_bool_key,
|
|
map_tinyint_key,
|
|
map_smallint_key,
|
|
map_bigint_key,
|
|
map_float_key,
|
|
map_double_key,
|
|
map_decimal_key,
|
|
map_string_key,
|
|
map_char_key,
|
|
map_varchar_key,
|
|
map_timestamp_key,
|
|
map_date_key
|
|
from map_null_keys;
|
|
---- RESULTS
|
|
1,'{true:"true",null:"null"}','{-1:"one",null:"null"}','{-1:"one",null:"null"}','{-1:"one",null:"null"}','{-1.75:"a",null:"null"}','{-1.75:"a",null:"null"}','{-1.8:"a",null:"null"}','{"one":1,null:null}','{"Mon":1,null:null}','{"a":"A",null:null}','{"2022-12-10 08:15:12":"Saturday morning",null:"null"}','{"2022-12-10":"Saturday",null:"null"}'
|
|
---- TYPES
|
|
INT,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING,STRING
|
|
=====
|