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

Parquet ObjectStore Writer #5524

Open
tustvold opened this issue Mar 17, 2024 · 3 comments
Open

Parquet ObjectStore Writer #5524

tustvold opened this issue Mar 17, 2024 · 3 comments
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

#3370 added first-party support for reading parquet from object_store.

Describe the solution you'd like

I would like similar first-party integration for writing

Describe alternatives you've considered

Additional context

#5500 reworks the ObjectStore traits to facilitate this

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Mar 17, 2024
@tustvold tustvold self-assigned this Mar 17, 2024
@tustvold tustvold removed their assignment May 29, 2024
@abhiaagarwal
Copy link
Contributor

Anyone working on this? I'd like to give it a shot. I gained a lot of familiarity with the Upload trait after reworking delta-rs for the new object_store.

@Xuanwo
Copy link
Member

Xuanwo commented Jun 14, 2024

Anyone working on this? I'd like to give it a shot. I gained a lot of familiarity with the Upload trait after reworking delta-rs for the new object_store.

Should be related to #5766, I'm working on it now.

@abhiaagarwal
Copy link
Contributor

@Xuanwo ah, sounds great! I finished implementing it on my end, but it's a little bit lazy, It's a little bit inelegant, I'll defer to you :)

impl AsyncFileWriter for ParquetObjectWriter {
    fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>> {
        self.upload.put_part(bs.into()).map_err(|e| {
            ParquetError::General(format!("ParquetObjectWriter::write error: {e}"))
        }).boxed()
    }

    fn complete(&mut self) -> BoxFuture<'_, Result<()>> {
        self.upload.complete().map_err(|e| {
            ParquetError::General(format!("ParquetObjectWriter::complete error: {e}"))
        }).map(|_| Ok(())).boxed()
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

No branches or pull requests

3 participants