You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Daniel Becker (Jira)" <ji...@apache.org> on 2021/09/23 15:22:00 UTC

[jira] [Created] (IMPALA-10929) Optimise memory usage of structs in tuples

Daniel Becker created IMPALA-10929:
--------------------------------------

             Summary: Optimise memory usage of structs in tuples
                 Key: IMPALA-10929
                 URL: https://issues.apache.org/jira/browse/IMPALA-10929
             Project: IMPALA
          Issue Type: Improvement
          Components: Frontend
            Reporter: Daniel Becker


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 
{code:java}
select id, outer_struct from functional_orc_def.complextypes_nested_structs;
{code}
the row size is 64B, while for

{code:java}
select id, outer_struct, outer_struct.inner_struct2 from functional_orc_def.complextypes_nested_structs;
{code}
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

{code:java}
select id, outer_struct from functional_orc_def.complextypes_nested_structs where outer_struct.inner_struct2.i > 1;
{code}
should also have a row size of 64B instead of 68B.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org