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(connector): introduce azblob file scan #20046

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

Conversation

wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Jan 7, 2025

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

What's changed and what's your intention?

Similar and follow up #19974
Support table function file_scan from azblob container, the syntax is file_scan(parquet, azblob, account_name, account_key, endpoint, file_loaction). The same with s3 file_scan, it also supports reading a single parquet file or all parquet files in a directory.

Implementation detail:

  • add AzblobFileScan Node
  • The public functions are all modified to pass in the opendal operator. Depending on the type of the passed in parameter, it is determined creating s3 operator or azblob operator.
  • test on azblob container and work well.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

endpoint: String,
container_name: String,
) -> ConnectorResult<Operator> {
// Create gcs builder.
Copy link

Choose a reason for hiding this comment

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

The comment "Create gcs builder" appears to be copy-pasted from the GCS implementation. For accuracy, this should be "Create Azure Blob builder" since this code initializes an Azure Blob storage operator.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 5543 files.

Valid Invalid Ignored Fixed
2338 1 3204 0
Click to see the invalid file list
  • src/batch/executors/src/executor/azblob_file_scan.rs
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

src/batch/executors/src/executor/azblob_file_scan.rs Outdated Show resolved Hide resolved
@wcy-fdu wcy-fdu requested a review from a team as a code owner January 7, 2025 09:25
@wcy-fdu wcy-fdu requested a review from BugenZhao January 7, 2025 09:25
Cargo.lock Outdated Show resolved Hide resolved
@wcy-fdu wcy-fdu requested review from hzxa21 and chenzl25 January 7, 2025 10:01
&& !"azblob".eq_ignore_ascii_case(&eval_args[1]))
{
return Err(BindError(
"file_scan function supports three backends: s3, gcs, and azblob. Their formats are as follows:: \n
Copy link

Choose a reason for hiding this comment

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

There is a minor typo in the error message - remove the double colon in as follows:: to make it as follows:

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@wcy-fdu wcy-fdu requested a review from hzxa21 January 10, 2025 02:52
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