Skip to content

Commit a6499c6

Browse files
jiaoqingbopan3793
authored andcommitted
[KYUUBI #3019] Backport HIVE-21538 - Beeline: password source though the console reader did not pass to connection param
### _Why are the changes needed?_ fix #3019 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [x] Add screenshots for manual tests if appropriate <img width="840" alt="微信截图_20220707180017" src="https://user-images.githubusercontent.com/14961757/177748470-9e8b70c5-5d07-4a2f-aff0-1b7cca8f164a.png"> <img width="837" alt="微信截图_20220707172722" src="https://user-images.githubusercontent.com/14961757/177748500-757ad0df-0ecf-43e3-8603-061470fa7e8a.png"> - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3021 from jiaoqingbo/kyuubi-3019. Closes #3019 75ef8ab [jiaoqingbo] [KYUUBI #3019] Backport HIVE-21538 Authored-by: jiaoqingbo <1178404354@qq.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 3c75e9d commit a6499c6

File tree

1 file changed

+15
-0
lines changed
  • kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive

1 file changed

+15
-0
lines changed

kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,21 @@ public static JdbcConnectionParams extractURLComponents(String uri, Properties i
441441
}
442442
}
443443

444+
if (!connParams.getSessionVars().containsKey(JdbcConnectionParams.AUTH_PASSWD)) {
445+
if (info.containsKey(JdbcConnectionParams.AUTH_USER)) {
446+
connParams
447+
.getSessionVars()
448+
.put(JdbcConnectionParams.AUTH_USER, info.getProperty(JdbcConnectionParams.AUTH_USER));
449+
}
450+
if (info.containsKey(JdbcConnectionParams.AUTH_PASSWD)) {
451+
connParams
452+
.getSessionVars()
453+
.put(
454+
JdbcConnectionParams.AUTH_PASSWD,
455+
info.getProperty(JdbcConnectionParams.AUTH_PASSWD));
456+
}
457+
}
458+
444459
if (info.containsKey(JdbcConnectionParams.AUTH_TYPE)) {
445460
connParams
446461
.getSessionVars()

0 commit comments

Comments
 (0)