Skip to content

Add ability to reuse DictionaryTracker when creating new IPC Stream #9195

Closed

Description

@albertlockett

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We're working on a protocol that sends/receives a stream of record batches as an encapsulated Arrow IPC stream. The stream of record batches has a dynamic schema, so each time the schema changes we begin a new IPC Stream.

Rather than throwing away and recreating an arrow_ipc::writer::StreamWriter each time this happens, which is wasteful/expensive, we created our own type for producing the IPC stream that tries to reuse as much as it can. However, for each stream it's still creating a new DictionaryTracker.

Describe the solution you'd like
I'd like for there to be a reset method on the DictionaryTracker that clears any internal state so I can reuse it without the allocation cost of creating a new one.

Describe alternatives you've considered
I had considered adding a reset method to StreamWriter. I might do that anyway in a followup PR if we're OK with it. But this method on StreamWriter would need to reset the DictionaryTracker anyway, so the solution described in this issue seemed like a good first step.

Additional context

Activity

  1. added
    enhancement
    on Jan 15, 2026
  2. added a commit that references this issue on Jan 17, 2026
    e565074
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions