Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-10929

Optimise memory usage of structs in tuples

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Frontend
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            daniel.becker Daniel Becker
            daniel.becker Daniel Becker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment