github-actions[bot] commented on code in PR #70725:
URL: https://github.com/apache/doris/pull/70725#discussion_r4623303142
##########
fe/fe-connector/fe-connector-lance/src/main/java/org/apache/doris/connector/lance/LanceS3StorageProvider.java:
##########
@@ -191,7 +188,41 @@ private static S3CompatibleFileSystemProperties
selectS3Compatible(
@Override
public Map<String, String> normalizeVendedStorageOptions(Map<String,
String> options) {
- return LanceStorageOptions.normalizeAliases(options,
CANONICAL_BY_ALIAS);
+ Map<String, String> normalized =
LanceStorageOptions.normalizeAliases(options, CANONICAL_BY_ALIAS);
+ if (normalized.containsKey(ACCESS_KEY_ID) &&
normalized.containsKey(SECRET_ACCESS_KEY)) {
+ // A vended key pair is its own identity. Without a token of its
own, it must not inherit
+ // either the catalog's STS token or an unrelated token from the
FE/BE environment.
+ normalized.putIfAbsent(SESSION_TOKEN, "");
+ }
+ return normalized;
+ }
+
+ @Override
+ public Map<String, String> mergeStorageOptions(String datasetUri,
Map<String, String> catalogOptions,
+ Map<String, String> vendedOptions) {
+ Map<String, String> merged =
LanceStorageProvider.super.mergeStorageOptions(
+ datasetUri, catalogOptions, vendedOptions);
+ if (!vendedOptions.containsKey(ENDPOINT)) {
+ // Only Doris endpoints need bucket qualification. Namespace
endpoints already use
+ // object_store's native vocabulary and must keep the meaning the
namespace assigned.
+ LanceStorageOptions.putIfNotEmpty(merged, ENDPOINT,
endpointForDataset(datasetUri,
+ catalogOptions.get(ENDPOINT),
Boolean.parseBoolean(merged.get(VIRTUAL_HOSTED_STYLE))));
Review Comment:
[P2] Match Lance's boolean grammar when reconciling the endpoint
The new parser treats valid namespace values such as
`virtual_hosted_style_request=on`, `1`, or `yes` as false, while the pinned
FE/BE object_store readers parse them as true. For `s3://warehouse/table.lance`
with an inherited `s3.endpoint=http://storage.example:9000`, this leaves both
endpoint options bucketless; the native virtual-hosted builder then uses that
endpoint verbatim, so the table request omits `warehouse` and fails. The
existing endpoint-merge fix handles literal `true`/`false`; this is a separate
mismatch in its newly added parser. Parse the final flag with the native
vocabulary and cover an alternate true spelling in the native host/path test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]