F21 commented on a change in pull request #54:
URL: https://github.com/apache/calcite-avatica-go/pull/54#discussion_r470298648



##########
File path: dsn.go
##########
@@ -207,7 +207,8 @@ func ParseDSN(dsn string) (*Config, error) {
        }
 
        if parsed.Path != "" {
-               conf.schema = strings.TrimPrefix(parsed.Path, "/")
+               s := strings.Split(parsed.Path, "/")
+               conf.schema = s[len(s)-1]

Review comment:
       @josiahg Can you add another test to test the case where there is a 
trailing slash and there's no default schema when the DSN is parsed? This is 
just so we don't break anything in the future if changes are made to the code 
that parses the DSN.
   
   Other than that, it looks great! 👍 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to