Skip to content
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

Add a parquet writer using Rust and CXX for FFI #194

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

the80srobot
Copy link
Contributor

@the80srobot the80srobot commented Dec 31, 2024

This adds a fairly MVP writer for Parquet files implemented in Rust and usable from C++. An actual Santa logger is just a stub, because this diff is already large. (And yet, I managed to shave off 1000 lines compared to my original PR from 2023.)

This XL PR could be split into one that adds Rust build support and one that adds the Parquet writer, but both of those things informed each other, so it actually seems easier to review them together. Sorry for the size, I won't make it a habit.

Some notes:

  • The patch for cxx is unfortunate, however the WORKSPACE -> MODULE migration seemingly broke everything and I couldn't find a combination of rules_rust and cxx that was both stable and easy to use with MODULE.bazel. The good news is that rules_rust 0.57.0 should fix everything, allowing me to update cxx and drop the patch. (Probably in a few weeks.)
  • The writer is fairly low-level. Pete's experiments AFAIK are with the more high-level arrow API. We should chat about trade-offs. I don't have a strong opinion on which is better. This PR does not lock us into one approach.

Test plan:

There is an e2e test shell script, which requires Docker.

@github-actions github-actions bot added docs Improvements or additions to documentation comp/santad Issues or PRs related to the daemon size/m Size: medium size/l Size: large size/xl Size: extra large and removed size/m Size: medium size/l Size: large labels Dec 31, 2024
This should be most of what we need to have some
packages written in Rust. It also manages to
depend on the parquet2 Crate, and proves that the
FFI works and Rust functions can be statically
linked with objc++ code.
This adds a proper parquet writer in Rust. The CPP
header is empty, and all the API is generated as a
Cxx bridge from cpp_api.rs, which I find rather
nice.
@the80srobot the80srobot marked this pull request as ready for review December 31, 2024 19:03
@the80srobot the80srobot requested a review from a team as a code owner December 31, 2024 19:03
@the80srobot the80srobot changed the title DRAFT/WIP - Add parquet2 Rust crate for parquet output Add parquet2 Rust crate for parquet output Dec 31, 2024
@the80srobot the80srobot changed the title Add parquet2 Rust crate for parquet output Add a parquet writer using Rust and CXX for FFI Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp/santad Issues or PRs related to the daemon docs Improvements or additions to documentation size/xl Size: extra large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant