You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "twuebi (via GitHub)" <gi...@apache.org> on 2025/09/12 13:18:34 UTC

Re: [PR] fix: Azure URI parsing with `KeyExtractor` function for `blobFileIO` preprocessing [iceberg-go]

twuebi commented on code in PR #562:
URL: https://github.com/apache/iceberg-go/pull/562#discussion_r2344241903


##########
io/azure.go:
##########
@@ -184,3 +189,18 @@ func createAzureBucket(ctx context.Context, parsed *url.URL, props map[string]st
 
 	return azureblob.OpenBucket(ctx, client, nil)
 }
+
+// adlsKeyExtractor creates a key extractor for Azure schemes using the adlsURIPattern pattern
+func adlsKeyExtractor() KeyExtractor {
+	return func(path string) (string, error) {
+		matches := adlsURIPattern.FindStringSubmatch(path)
+		if len(matches) < 4 {
+			// If it doesn't match Azure pattern, return path as-is
+			return "", fmt.Errorf("invalid ADLS location: %s", path)

Review Comment:
   The comment and the return statement don't match up, right?



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org