dwsmith1983 opened a new pull request, #7562:
URL: https://github.com/apache/datafusion-comet/pull/7562

   ## Which issue does this PR close?
   
   Part of #7128.
   
   This is the third of four pull requests for #7128, each covering one area. 
They build on #7127, which adds the URL redaction helpers they use, so #7127 
merges first. Suggested order after it:
   
   1. #7556: object store setup and its error messages.
   2. #7561: the Parquet writer's URL errors, plan display and debug log.
   3. This one: native Delta's URL display and deletion vector errors.
   4. The rejected path reason on the JVM side, which closes #7128.
   
   They target `main`, so until #7127 merges each one also shows its commits.
   
   ## Rationale for this change
   
   Native Delta masks the userinfo of a URL before putting it in an error, but 
it kept the query string, so a URL whose only credential is a SAS token or 
signature was printed whole. The deletion vector errors printed the data file 
and deletion vector paths with no redaction at all, and an absolute deletion 
vector path can be such a URL.
   
   ## What changes are included in this PR?
   
   - `redacted_url_display` is built on the helpers from #7127. It drops the 
password, query and fragment, masks the username as `***`, and keeps an ABFS 
username, which names the container. A URL with nothing to hide is shown as 
given.
   - A string that does not parse shows only its scheme. The old fallback 
guessed where the authority ended and could print a password that contains a 
`/`.
   - The deletion vector errors show the data file and deletion vector paths 
through the same helper.
   
   The JVM already declines Delta files whose URI has userinfo, and Hadoop puts 
a `?` written into a Delta path into the path itself, which these helpers keep 
as they do for every path. This change covers what reaches native code as a 
real query or userinfo.
   
   ## How are these changes tested?
   
   Native tests build URLs with a password, a username, a signature query and a 
fragment, and check that none of them appears in the authority check, the store 
resolver's parse error, the mixed store and store identity errors, and two 
deletion vector errors, while the scheme, host and path do. Others pin the ABFS 
container, unparseable and opaque strings, and secret-free paths shown as 
given. Each test fails on the base branch.
   


-- 
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]

Reply via email to