Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
ghx-label-1
Description
If we have both a whole struct and one of its members (or a member of a member etc.) in the select list, the whole struct and the member are assigned to different slots in the tuple. We could use less memory if the member expression used the slot within the whole struct instead.
Example:
For the query
select id, outer_struct from functional_orc_def.complextypes_nested_structs;
the row size is 64B, while for
select id, outer_struct, outer_struct.inner_struct2 from functional_orc_def.complextypes_nested_structs;
it is 80B, although it should not need more memory.
It is not limited to the select list, it should also work with where clauses etc., for example
select id, outer_struct from functional_orc_def.complextypes_nested_structs where outer_struct.inner_struct2.i > 1;
should also have a row size of 64B instead of 68B.
Attachments
Issue Links
- duplicates
-
IMPALA-11067 Unify struct subexpressions in rows
- Resolved