dwsmith1983 opened a new pull request, #7744: URL: https://github.com/apache/datafusion-comet/pull/7744
## Which issue does this PR close? Closes #7732. ## Rationale for this change iceberg-rust's storages cannot open a location with user info in its authority, such as `s3://alice:SECRET@bucket/t/f.parquet`. The object stores take the bucket from the host and then require the path to start with `scheme://bucket/`, and the HDFS storage rejects user info outright. Comet still planned the native scan or write, the task failed, and the iceberg-rust error printed the whole location, password included (apache/iceberg-rust#3746). The issue suggested a native rejection that names the location through `redacted_url_display`. This declines in the JVM instead, so the location never reaches iceberg-rust and no reason has to name it. ## What changes are included in this PR? - `NativeConfig.hasUserInfo` reports user info in a location's raw authority. A text form covers locations `java.net.URI` rejects, such as a password with an unencoded space, after removing the tab, newline and surrounding whitespace that URL parsing ignores. - The Iceberg scan falls back when a data or delete file location has user info: `Iceberg scan references a data/delete file location with user info in its authority, which Comet's native Iceberg reader cannot open`. Such a location is kept out of the bucket, HDFS and storage-family checks, so their reasons cannot print it. - The Iceberg write falls back when the data location has user info: `<scheme> data location carries user info in its authority`. - `iceberg.md` lists both fallbacks. No object-store or HDFS location that works today changes. A `file` location with user info, which iceberg-rust would resolve to a different local path, and a `memory` one now fall back too. The metadata location is not checked: native only reads its scheme and bucket, so a table with user info only there still runs natively. A password whose `/`, `?` or `#` ends the authority early (`s3://alice:/SECRET@bucket/p`) has no user info as far as the parser can tell, so it still goes native; that case is left to apache/iceberg-rust#3746. This touches the same functions as #7743. Merging this one first is simpler; #7743 then keeps both branches in `requireSupportedStorageScheme`, the `iceberg.md` table row and the write test. ## How are these changes tested? `NativeConfigSuite` covers `hasUserInfo` for user, password, empty user info, a registry host, IPv6, HDFS, `file`, an `@` in the path, query or fragment, opaque URIs, locations `URI` rejects, and the early-authority shape. `CometScanSchemeFallbackSuite` declines scans with user info in an HDFS, S3, S3-compliant alias, `file` or schemeless data file and in a delete file, checks an HDFS scan is not probed for an encryption zone with the user info in its path, and keeps a partition value with `@` native. `CometIcebergWriteDetectionSuite` checks the write reason, including a location with a tab, and that the unsupported-scheme reason still wins for HDFS. Each new test fails on main. -- 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]
