fallintoplace commented on code in PR #1644:
URL: https://github.com/apache/iceberg-go/pull/1644#discussion_r3747632524
##########
table/orphan_cleanup.go:
##########
@@ -802,31 +804,99 @@ func normalizeURLPath(path string, cfg
*orphanCleanupConfig) string {
normalizedScheme := applySchemeEquivalence(parsedURL.Scheme,
equalSchemes)
normalizedAuthority := applyAuthorityEquivalence(parsedURL.Host,
equalAuthorities)
- normalizedURL := &url.URL{
- Scheme: normalizedScheme,
- Host: normalizedAuthority,
- Path: filepath.Clean(parsedURL.Path),
- }
+
+ // Object-store paths are opaque keys. Keep their spelling exactly as
+ // supplied: escaped separators, duplicate slashes, and dot segments can
+ // all be meaningful parts of a key. Only the explicitly configured
scheme
+ // and authority equivalences are normalized here.
+ normalizedURL := *parsedURL
Review Comment:
I don't think dropping RawQuery and Fragment is safe here though.
iceberg-go's object FileIO intentionally treats the portion after the
authority as an opaque object key. In splitObjectLocation, ? and # are
preserved as part of the raw key rather than interpreted as URL query/fragment
components.
So s3://bucket/key, s3://bucket/key?version=1, and s3://bucket/key#metadata
can represent distinct object names for the FileIO.
--
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]