dwsmith1983 commented on code in PR #7127:
URL: https://github.com/apache/datafusion-comet/pull/7127#discussion_r4383883610
##########
spark/src/main/scala/org/apache/comet/objectstore/NativeConfig.scala:
##########
@@ -132,6 +132,19 @@ object NativeConfig {
rawAuthority.substring(rawAuthority.lastIndexOf('@') + 1)
}
+ /** As in native, the user ends at the first `:` and the host follows the
last `@`. */
+ private def authorityWithoutPassword(uri: URI): String = {
+ val rawAuthority = Option(uri.getRawAuthority).getOrElse("")
+ val at = rawAuthority.lastIndexOf('@')
+ val user = rawAuthority.take(at).takeWhile(_ != ':')
Review Comment:
`authorityWithoutPassword` returns the raw authority when there is no `@`,
or when no `:` comes before the last `@`. Everything else, including an empty
container, takes the slicing path as before, and a missing authority still
gives `""`.
`NativeConfigSuite` asserts that `container@host` and `container@host:8443`
come back as the same `String` instance as `getRawAuthority`, and the existing
`objectStoreKey` and `displayAuthority` cases cover the password, port and
empty-container shapes.
--
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]