-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support tencent cloud COS storage in datafusion-cli
#9734
Conversation
@@ -388,7 +411,7 @@ Note that the `endpoint` format of oss needs to be: `https://{bucket}.{oss-regio | |||
CREATE EXTERNAL TABLE test | |||
STORED AS PARQUET | |||
OPTIONS( | |||
'service_account_path' '/tmp/gcs.json', | |||
'gcp.service_account_path' '/tmp/gcs.json', |
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.
is it related to cos onboard?
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.
No, add the missing prefix gcp and aws to related external table options.
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.
Thanks @harveyyue for your contribution.
Please add more details to the PR description, this will makes easier to other people what is the PR without going though the code.
Other than that it looks good, I'll leave it for other reviewers to have a second look.
@@ -415,6 +424,15 @@ pub(crate) async fn get_object_store( | |||
let builder = get_oss_object_store_builder(url, options)?; | |||
Arc::new(builder.build()?) | |||
} | |||
"cos" => { | |||
let Some(options) = table_options.extensions.get::<AwsOptions>() else { |
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.
In follow up we need to refactor this part as for different schemas its too much of the common code
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.
Yes, agree with you.
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.
It would be great to file a ticket to do so 🙏
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.
Looks good to me. Thank you @harveyyue and @comphead for the review
I took the liberty of fixing the clippy CI test and merging up from main and pushed the commits to your branch
@@ -415,6 +424,15 @@ pub(crate) async fn get_object_store( | |||
let builder = get_oss_object_store_builder(url, options)?; | |||
Arc::new(builder.build()?) | |||
} | |||
"cos" => { | |||
let Some(options) = table_options.extensions.get::<AwsOptions>() else { |
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.
It would be great to file a ticket to do so 🙏
datafusion-cli
Thanks again @harveyyue and @comphead |
Which issue does this PR close?
NA
Rationale for this change
What changes are included in this PR?
Support
cos://
schema as below:Are these changes tested?
yes, unit test
Are there any user-facing changes?
no