Skip to content

Conversation

@peasee
Copy link

@peasee peasee commented Dec 10, 2025

🗣 Description

  • Supports retrieving a WriterStrategyBuilder from the available VortexSession, to update the writer strategy used when built via session.write_options()

gatesn and others added 2 commits December 9, 2025 20:24
The comments described this get-or-default, but instead it was a panic

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>
@peasee peasee self-assigned this Dec 10, 2025
@peasee peasee added the enhancement New feature or request label Dec 10, 2025
Copilot AI review requested due to automatic review settings December 10, 2025 02:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables retrieving a WriterStrategyBuilder from a VortexSession, allowing users to configure the writer strategy used by session.write_options(). The implementation adds new session retrieval methods and updates the trait bounds to support both optional and default-initialized session variables.

Key changes:

  • Added set() method to VortexSession for inserting session variables with custom values
  • Added get_opt() and get_mut_opt() methods to retrieve optional session variables without requiring Default implementations
  • Modified write_options() to check for and use a session-stored WriteStrategyBuilder if available
  • Added Debug and Clone derives to support storing WriteStrategyBuilder in sessions

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
vortex-session/src/lib.rs Adds set() method and optional retrieval methods (get_opt, get_mut_opt) for session variables, updates existing methods to require Default only when auto-inserting
vortex-layout/src/layouts/compressed.rs Adds Debug trait bound to CompressorPlugin trait and its implementations to support session storage
vortex-file/src/writer.rs Updates write_options() to retrieve and use WriteStrategyBuilder from session if available, includes basic test coverage
vortex-file/src/strategy.rs Adds Debug and Clone derives to WriteStrategyBuilder to enable session storage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peasee peasee merged commit b701e1e into spiceai Dec 10, 2025
18 of 41 checks passed
@peasee peasee deleted the peasee-writer-options-2 branch December 10, 2025 03:24
lukekim pushed a commit that referenced this pull request Jan 14, 2026
* Fix session get-or-default (vortex-data#5662)

The comments described this get-or-default, but instead it was a panic

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>

* feat: Support retrieving writer strategy builder from vortex session

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-authored-by: Nicholas Gates <gatesn@users.noreply.github.com>
lukekim pushed a commit that referenced this pull request Feb 6, 2026
* Fix session get-or-default (vortex-data#5662)

The comments described this get-or-default, but instead it was a panic

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>

* feat: Support retrieving writer strategy builder from vortex session

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-authored-by: Nicholas Gates <gatesn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants