Repository navigation
fix: fall back to Spark for an Iceberg location with user info in its authority - #7744
Draft
dwsmith1983 wants to merge 1 commit into
Draft
dwsmith1983 wants to merge 1 commit into
dwsmith1983 wants to merge 1 commit into
Conversation
… authority iceberg-rust's storages cannot open a location 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. The Iceberg scan now falls back when a data or delete file location has user info in its authority, and the write falls back when the data location does, with reasons that do not name the location. NativeConfig.hasUserInfo reads the raw authority, and a text form covers locations java.net.URI rejects, after stripping the characters URL parsing ignores. Closes apache#7732
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withscheme://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.hasUserInforeports user info in a location's raw authority. A text form covers locationsjava.net.URIrejects, such as a password with an unencoded space, after removing the tab, newline and surrounding whitespace that URL parsing ignores.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.<scheme> data location carries user info in its authority.iceberg.mdlists both fallbacks.No object-store or HDFS location that works today changes. A
filelocation with user info, which iceberg-rust would resolve to a different local path, and amemoryone 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, theiceberg.mdtable row and the write test.How are these changes tested?
NativeConfigSuitecovershasUserInfofor user, password, empty user info, a registry host, IPv6, HDFS,file, an@in the path, query or fragment, opaque URIs, locationsURIrejects, and the early-authority shape.CometScanSchemeFallbackSuitedeclines scans with user info in an HDFS, S3, S3-compliant alias,fileor 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.CometIcebergWriteDetectionSuitechecks 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.