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

feat(batch): support batch s3 parquet file executor #17606

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

chenzl25
Copy link
Contributor

@chenzl25 chenzl25 commented Jul 8, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@chenzl25 chenzl25 requested a review from a team as a code owner July 8, 2024 08:21
@chenzl25 chenzl25 requested a review from MrCroxx July 8, 2024 08:21
@graphite-app graphite-app bot requested a review from a team July 8, 2024 08:21
@chenzl25 chenzl25 requested review from xiangjinwu and removed request for a team July 8, 2024 08:21
Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

The rest LGTM

Comment on lines +101 to +103
let file_io_builder = FileIOBuilder::new("s3");
let file_io = file_io_builder.with_props(props.into_iter()).build()?;
let parquet_file = file_io.new_input(&self.location)?;
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason of using iceberg::io to access the object storage, instead of OpenDAL or AWS client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially, I implemented it with OpenDAL, but found that to read a parquet file, we need to reimplement a bunch of logic that has already been implemented in iceberg-rust, so I don't want to reinvent the wheel again. BTW, iceberg FileIO looks good to me, because in iceberg scan, we need to use this interface to avoid resolving iceberg metadata again in the compute node while scanning parquet files.

Copy link
Member

Choose a reason for hiding this comment

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

I see. I noticed that iceberg::io actually use OpenDAL under the hood.

https://github.com/apache/iceberg-rust/blob/48f9e3e8bff0224569da8dd5beb89ed0c8cc4513/crates/iceberg/src/io/storage.rs#L76

However, don't know why the implementation limits the storage to be AWS S3. Do you know?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the core module of iceberg-rust is still under development, so only AWS S3 is supported currently.


batch_stream_builder = batch_stream_builder.with_batch_size(self.batch_size);

let record_batch_stream = batch_stream_builder.build().map_err(|e| anyhow!(e))?;
Copy link
Member

Choose a reason for hiding this comment

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

Recommend using some specific error instead of anyhow!(e)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will improve it together with the next PR.

@chenzl25 chenzl25 added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit 607a2af Jul 9, 2024
29 of 30 checks passed
@chenzl25 chenzl25 deleted the dylan/support_batch_s3_parquet_file_executor branch July 9, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants