Skip to content

Port StreamingFeatherWriter to Rust #2292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 9, 2025
Merged

Port StreamingFeatherWriter to Rust #2292

merged 9 commits into from
Feb 9, 2025

Conversation

twitu
Copy link
Collaborator

@twitu twitu commented Feb 7, 2025

Pull Request

Introduces a writer for persisting data to the feather file format. It is most useful for persisting live run data to disk for replaying or debugging purposes. It uses arrow serialization and schema logic defined for the data to write data as record batches. It partitions the data based on the data type and further by instrument id (if configured). Related #2062.

The main entry point is for writing data is write.

    /// Writes a single data value.
    /// This is the user entry point. The data is encoded into a RecordBatch and written to the appropriate FileWriter.
    /// If the writer's buffer reaches capacity or meets rotation criteria (based on the rotation configuration),
    /// the FileWriter is flushed to the object store and replaced.
    pub async fn write<T>(&mut self, data: T) -> Result<(), Box<dyn std::error::Error>>
    where
        T: EncodeToRecordBatch + CatalogPathPrefix + 'static,

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested?

WIP

@twitu twitu marked this pull request as draft February 7, 2025 10:22
@cjdsellers
Copy link
Member

Thank you for your contribution! 🙏

The pre-commit checks failed, but this is easy to fix. You'll need to run:

make pre-commit
# or
pre-commit run --all-files

This will automatically fix most formatting issues. Just commit any changes and push again.

See our CONTRIBUTING.md guide for more details.

@cjdsellers
Copy link
Member

Thank you for your contribution! 🙏

The pre-commit checks failed, but this is easy to fix. You'll need to run:

make pre-commit
# or
pre-commit run --all-files

This will automatically fix most formatting issues. Just commit any changes and push again.

See our CONTRIBUTING.md guide for more details.

@cjdsellers
Copy link
Member

Thank you for your contribution! 🙏

The pre-commit checks failed, but this is easy to fix. You'll need to run:

make pre-commit
# or
pre-commit run --all-files

This will automatically fix most formatting issues. Just commit any changes and push again.

See our CONTRIBUTING.md guide for more details.

@twitu twitu marked this pull request as ready for review February 9, 2025 14:35
@cjdsellers cjdsellers changed the title Feather writer for persisting data Port StreamingFeatherWrtier to Rust Feb 9, 2025
@cjdsellers cjdsellers changed the title Port StreamingFeatherWrtier to Rust Port StreamingFeatherWriter to Rust Feb 9, 2025
@cjdsellers cjdsellers merged commit 13af73e into develop Feb 9, 2025
12 checks passed
@cjdsellers cjdsellers deleted the feather-writer branch February 9, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants