-
Notifications
You must be signed in to change notification settings - Fork 985
[KYUUBI-7316] Fix parsePropertyFromUrl to remove query string from parsed values #7317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -568,7 +568,13 @@ public static String parsePropertyFromUrl(final String url, final String key) { | |||||
| String[] tokens = url.split(";"); | ||||||
| for (String token : tokens) { | ||||||
| if (token.trim().startsWith(key.trim() + "=")) { | ||||||
| return token.trim().substring((key.trim() + "=").length()); | ||||||
| String value = token.trim().substring((key.trim() + "=").length()); | ||||||
| // Remove query string part (anything after ?) to match extractURLComponents behavior | ||||||
| int queryIndex = value.indexOf('?'); | ||||||
| if (queryIndex > 0) { | ||||||
|
||||||
| if (queryIndex > 0) { | |
| if (queryIndex >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot-pull-request-reviewer could you also add a test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Copilot could you also add a test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java
Lines 482 to 514 in dfd9b49
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://kyuubi.readthedocs.io/en/master/client/jdbc/kyuubi_jdbc.html#basic-connection-url-format
We can parse the clientProperties only to get auth property