mirror of
https://github.com/apache/impala.git
synced 2025-12-30 12:02:10 -05:00
The query option PARQUET_FALLBACK_SCHEMA_RESOLUTION allows matching of Parquet fields by name instead of by index (the default). Parquet column names are case sensitive, but Impala treats db/table/column/field names as case-insensitive. Today, there is no way today to select Parquet columns with mixed casing via SQL using the name-based field resolution policy. This patch changes the matching of Parquet fields to be case-insensitive. Testing: - Modified the data files backing complextypestbl to contain fields with mixed casing. - Several existing tests run against this table, including the test for name-based resolution. - I confirmed that without this fix, the existing name-based resolution tests fail on the modified data files. - I locally ran test_scanners.py and test_nested_types.py on exhaustive with this fix. Change-Id: I87395f84ba29b4c3d8e41be1ea4e89e500b8a9f4 Reviewed-on: http://gerrit.cloudera.org:8080/5891 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Impala Public Jenkins
89 lines
1.8 KiB
JSON
89 lines
1.8 KiB
JSON
[
|
|
{"id": 1,
|
|
"int_array": [1,2,3],
|
|
"int_array_Array": [[1,2],[3,4]],
|
|
"int_map": {"k1": 1, "k2": 100},
|
|
"int_Map_Array": [{"k1": 1}],
|
|
"nested_struct": {
|
|
"A": 1,
|
|
"b": [1],
|
|
"C": {
|
|
"d": [
|
|
[{"E": 10, "F": "aaa"},
|
|
{"E": -10, "F": "bbb"}],
|
|
[{"E": 11, "F": "c"}]]},
|
|
"g": {"foo": {"H": {"i": [1.1]}}}}},
|
|
{"id": 2,
|
|
"int_array": [null,1,2,null,3,null],
|
|
"int_array_Array": [[null,1,2,null],[3,null,4],[], null],
|
|
"int_map": {"k1": 2, "k2": null},
|
|
"int_Map_Array": [{"k3": null, "k1": 1}, null, {}],
|
|
"nested_struct": {
|
|
"A": null,
|
|
"b": [null],
|
|
"C": {"d": [
|
|
[{"E": null, "F": null},
|
|
{"E": 10, "F": "aaa"},
|
|
{"E": null, "F": null},
|
|
{"E": -10, "F": "bbb"},
|
|
{"E": null, "F": null}],
|
|
[{"E": 11, "F": "c"},
|
|
null],
|
|
[],
|
|
null]},
|
|
"g": {
|
|
"g1": {"H": {"i": [2.2, null]}},
|
|
"g2": {"H": {"i": []}},
|
|
"g3": null,
|
|
"g4": {"H": {"i": null}},
|
|
"g5": {"H": null}}}},
|
|
{"id": 3,
|
|
"int_array": [],
|
|
"int_array_Array": [null],
|
|
"int_map": {},
|
|
"int_Map_Array": [null, null],
|
|
"nested_struct": {
|
|
"A": null,
|
|
"b": null,
|
|
"C": {"d": []},
|
|
"g": {}}},
|
|
{"id": 4,
|
|
"int_array": null,
|
|
"int_array_Array": [],
|
|
"int_map": {},
|
|
"int_Map_Array": [],
|
|
"nested_struct": {
|
|
"A": null,
|
|
"b": null,
|
|
"C": {"d": null},
|
|
"g": null}},
|
|
{"id": 5,
|
|
"int_array": null,
|
|
"int_array_Array": null,
|
|
"int_map": {},
|
|
"nested_struct": {
|
|
"A": null,
|
|
"b": null,
|
|
"C": null,
|
|
"g": {"foo": {"H": {"i": [2.2, 3.3]}}}}},
|
|
{"id": 6,
|
|
"int_array": null,
|
|
"int_array_Array": null,
|
|
"int_map": null,
|
|
"int_Map_Array": null,
|
|
"nested_struct": null},
|
|
{"id": 7,
|
|
"int_array": null,
|
|
"int_array_Array": [null,[5,6]],
|
|
"int_map": {"k1": null, "k3": null},
|
|
"int_Map_Array": null,
|
|
"nested_struct": {
|
|
"A": 7,
|
|
"b": [2,3,null],
|
|
"C": {"d": [
|
|
[],
|
|
[null],
|
|
null]},
|
|
"g": null}}
|
|
]
|