[
https://issues.apache.org/jira/browse/IMPALA-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on IMPALA-11685 started by Daniel Becker.
----------------------------------------------
> Slot memory sharing between struct and field not working if the field is also
> a struct
> --------------------------------------------------------------------------------------
>
> Key: IMPALA-11685
> URL: https://issues.apache.org/jira/browse/IMPALA-11685
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Reporter: Daniel Becker
> Assignee: Daniel Becker
> Priority: Major
>
> IMPALA-10838 introduced that if a struct and one of its fields are both
> present in the select list, no extra slot is generated in the row for the
> struct field but the memory of the struct is reused, i.e. the row size is the
> same as when only the struct is queried. It works when the struct field is a
> primitive type:
> {code:java}
> explain select id, outer_struct from
> functional_orc_def.complextypes_nested_structs;
> row-size=64B{code}
> {code:java}
> explain select id, outer_struct, outer_struct.str from
> functional_orc_def.complextypes_nested_structs;
> row-size=64B{code}
> However, it does not if the child is itself a struct:
> {code:java}
> explain select id, outer_struct, outer_struct.inner_struct3 from
> functional_orc_def.complextypes_nested_structs;
> row-size=80B{code}
> This is because struct slot descriptors are registered before others so that
> it is easier to reuse the slot memory of the struct fields, but struct slot
> descriptors among themselves are sorted in the wrong order (see
> [https://github.com/apache/impala/blob/c12ac6c27b2df1eae693b44c157d65499f491d21/fe/src/main/java/org/apache/impala/analysis/SelectStmt.java#L340).]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]