This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 20a74e25c9f [fix](TVF) Enable azure tvf without specifying s3 bucket
property. (#37240)
20a74e25c9f is described below
commit 20a74e25c9f91bf0199ff10a2542947a87e2982b
Author: AlexYue <[email protected]>
AuthorDate: Thu Jul 4 23:25:51 2024 +0800
[fix](TVF) Enable azure tvf without specifying s3 bucket property. (#37240)
## Proposed changes
<!--Describe your changes.-->
For azure blob storage, the region property is unnecessary. But the
legacy tvf code would check if the properties contains bucket, so this
pr tries to set one mock bucket property for azure tvf.
---
.../java/org/apache/doris/tablefunction/S3TableValuedFunction.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/S3TableValuedFunction.java
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/S3TableValuedFunction.java
index 816042de926..7a9566c13e0 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/S3TableValuedFunction.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/S3TableValuedFunction.java
@@ -57,6 +57,10 @@ public class S3TableValuedFunction extends
ExternalFileTableValuedFunction {
public S3TableValuedFunction(Map<String, String> properties) throws
AnalysisException {
final boolean isAzureTvf =
AzureProperties.checkAzureProviderPropertyExist(properties);
+ // Azure could run without region
+ if (isAzureTvf) {
+ properties.put(S3Properties.REGION, "DUMMY-REGION");
+ }
// 1. analyze common properties
Map<String, String> otherProps =
super.parseCommonProperties(properties);
@@ -79,8 +83,7 @@ public class S3TableValuedFunction extends
ExternalFileTableValuedFunction {
// get endpoint first from properties, if not present, get it from s3
uri.
// If endpoint is missing, exception will be thrown.
String endpoint = constructEndpoint(otherProps, s3uri);
- // Azure could run without region
- if (!otherProps.containsKey(S3Properties.REGION) && !isAzureTvf) {
+ if (!otherProps.containsKey(S3Properties.REGION)) {
String region = s3uri.getRegion().orElseThrow(() ->
new AnalysisException(String.format("Properties '%s' is
required.", S3Properties.REGION)));
otherProps.put(S3Properties.REGION, region);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]