ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1025
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      CompactHashAggStage keeps the states of all accumulators of a group in one heap block. This ticket adds the types that lay out, create, and destroy those blocks, and the hash table that maps group-by keys to them.

      Scope of Work

      • CompactStateLayoutBuilder: registers each state type with add<T>(), which returns the state's offset in the block. Offsets follow registration order, with sizes rounded up to 8 bytes.
      • CompactStateLayout: the offsets and per-state construct and destroy functions. create() allocates a block and constructs every state, undoing on a throw; destroy() runs destructors in reverse order and frees the block with sized delete.
      • CompactStateTable: an absl::flat_hash_map from MaterializedRow keys to block pointers. findOrInsert() owns its keys and creates a block for each new key; clear() and the destructor destroy every block.

      Acceptance Criteria

      • Unit tests cover layout offsets, construction and destruction, exception safety, key ownership, and collation-aware key matching.
      • Nothing uses the new types yet; later tickets in the epic build on them.

            Assignee:
            Evan Bergeron
            Reporter:
            Evan Bergeron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: