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): add minio file scan type and enhance test #19950

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

Conversation

wcy-fdu
Copy link
Contributor

@wcy-fdu wcy-fdu commented Dec 27, 2024

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

What's changed and what's your intention?

Previously, file_scan only supported reading Parquet files on S3 and had no test coverage. This PR adds support for file_scan(parquet, minio, ...) and includes file scan test in the file source tests of the main cron job. Since MinIO is S3-compatible, it requires nearly the same parameters as S3, with the only difference being the need for a special endpoint setting when building the operator. Therefore, this PR reuses the existing file scan node.

Note: File scan from MinIO is currently for testing purposes only.

Later, we will also add file_scan(parquet, gcs), and there may be a new plan node for that; we'll address that in subsequent PRs.

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

.secret_access_key(&s3_secret_key)
.bucket(&bucket);
builder = match is_minio {
true => builder.endpoint(&format!("http://{}.127.0.0.1:9301", bucket)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we allow users to provide s3 endpoint instead of hardcoding the endpoint?

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 minio is only for test, so I hardcode it. IMO, we don't public file_scan(minio) to user, what do you think?

Copy link
Contributor Author

@wcy-fdu wcy-fdu Dec 27, 2024

Choose a reason for hiding this comment

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

Should we allow users to provide s3 endpoint instead of hardcoding the endpoint?

And this will require another parameter in file scan, which is a bit redudant. I prefer to provide users with only the file scan backend that is consistent with Cloud(s3, gcs, azblob).

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse the s3 region parameter position to allow users to set the endpoint as well, i.e. (region or endpoint)?

Copy link
Contributor Author

@wcy-fdu wcy-fdu Dec 27, 2024

Choose a reason for hiding this comment

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

region is a required field. If we change region to endpoint, the user's endpoint must include region. Is this a bit strange?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When testing minio, the region is custom, the endpoint is http://bucket/127.0.0.1:9301, they have no intersection.

Copy link
Contributor

Choose a reason for hiding this comment

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

If an endpoint is specified, the region field is useless (Correct?). I mean file_scan('parquet', 's3', region_or_endpoint, ...) the region_or_endpoint parameter could be region or endpoint, we can detect it simply by http prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me take a try.

@graphite-app graphite-app bot requested a review from a team December 27, 2024 10:32
@risingwavelabs risingwavelabs deleted a comment from chenzl25 Dec 27, 2024
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