-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat: Datafusion file sink #2155
Conversation
} | ||
} | ||
|
||
impl VortexWrite for ObjectStoreWriter { | ||
async fn write_all<B: IoBuf>(&mut self, buffer: B) -> io::Result<B> { | ||
self.multipart | ||
.as_mut() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to be problematic with Send
, and anyway nothing here was actually used.
Co-authored-by: Andrew Duffy <[email protected]>
vortex-io/src/object_store.rs
Outdated
const CHUNKS_SIZE: usize = 25 * 1024 * 1204; | ||
|
||
for (chunk_idx, chunk) in slice.chunks(25 * 1024 * 1204).enumerate() { | ||
let payload = Bytes::copy_from_slice(&slice[chunk_idx * CHUNKS_SIZE..][..chunk.len()]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use chunk
here instead of re-slicing the slice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had a lifetime issue, apparently I don't
c7c0165
to
9b090a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, we can follow up and figure out how to compress the chunks as they're written
This writer is very simple compared to the built-in ones, it doesn't support as many features and generates one file per COPY/INSERT operation.
Closes #2148.