Skip to content

Feat: move ExecuteResult to iterator #14

@MBHuman

Description

@MBHuman

Summary

Replace ExecuteResult (materialized rows slice) with a streaming iterator interface to reduce memory usage, enable large result sets, and support backpressure.

Motivation

Current ExecuteResult loads all rows into memory. This is inefficient for large queries and prevents streaming results over wire protocols. An iterator-based approach enables:

  • Low memory usage
  • Early row delivery
  • Better integration with network streaming
  • Cancellation/backpressure

Goals

  • Introduce a uniform RowIterator abstraction.
  • Preserve current APIs via adapters during transition.
  • Minimize breaking changes for existing executor logic.

Non-Goals

  • Changing SQL semantics.
  • Rewriting storage engine internals beyond result delivery.
  • Adding distributed sharding here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions