-
Notifications
You must be signed in to change notification settings - Fork 916
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
[KYUUBI #4522] use:catalog
should execute before than use:database
#4648
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4648 +/- ##
============================================
- Coverage 57.64% 57.60% -0.04%
Complexity 13 13
============================================
Files 579 579
Lines 31901 31956 +55
Branches 4263 4270 +7
============================================
+ Hits 18389 18409 +20
- Misses 11755 11786 +31
- Partials 1757 1761 +4
... and 15 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -57,16 +57,20 @@ class FlinkSessionImpl( | |||
|
|||
override def open(): Unit = { | |||
executor.openSession(handle.identifier.toString) | |||
normalizedConf.foreach { | |||
case ("use:catalog", catalog) => | |||
normalizedConf.get("use:catalog") match { |
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.
How about
val (useCatalogAndDatabaseConf, otherConf) = normalizedConf.partition { case (k, _) =>
Array("use:catalog", "use:database").contains(k)
}
?
Apply the same changes on Trino session too? |
Array("use:catalog", "use:database").contains(k) | ||
} | ||
|
||
useCatalogAndDatabaseConf.get("use:catalog") match { |
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.
useCatalogAndDatabaseConf.get("use:catalog") match { | |
useCatalogAndDatabaseConf.get("use:catalog").foreach { catalog => | |
... |
use:catalog
should execute before than use:database
Thanks, merged to master/1.7 |
### _Why are the changes needed?_ close #4522 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4648 from lsm1/fix/kyuubi_4522. Closes #4522 e060468 [senmiaoliu] use foreach bd83d66 [senmiaoliu] spilt narmalizedConf 4d8445a [senmiaoliu] avoid sort eda34d4 [senmiaoliu] use catalog first Authored-by: senmiaoliu <senmiaoliu@trip.com> Signed-off-by: Cheng Pan <chengpan@apache.org> (cherry picked from commit f0796ec) Signed-off-by: Cheng Pan <chengpan@apache.org>
Why are the changes needed?
close #4522
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request