Skip to content
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

[Bug] The use:catalog and use:database execution order seems not guaranteed #4522

Closed
2 of 4 tasks
yaooqinn opened this issue Mar 15, 2023 · 2 comments
Closed
2 of 4 tasks
Assignees
Labels
kind:bug This is a clearly a bug priority:major

Comments

@yaooqinn
Copy link
Member

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the bug

    normalizedConf.foreach {
      case ("use:catalog", catalog) =>
        try {
          SparkCatalogShim().setCurrentCatalog(spark, catalog)
        } catch {
          case e if e.getMessage.contains("Cannot find catalog plugin class for catalog") =>
            warn(e.getMessage())
        }
      case ("use:database", database) =>
        try {
          SparkCatalogShim().setCurrentDatabase(spark, database)
        } catch {
          case e
              if database == "default" && e.getMessage != null &&
                e.getMessage.contains("not found") =>
        }
      case (key, value) => setModifiableConfig(key, value)
    }

as normalizedConf does not preserve the insertion order

Affects Version(s)

1.7.0

Kyuubi Server Log Output

No response

Kyuubi Engine Log Output

No response

Kyuubi Server Configurations

No response

Kyuubi Engine Configurations

No response

Additional context

No response

Are you willing to submit PR?

  • Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
  • No. I cannot submit a PR at this time.
@yaooqinn yaooqinn added kind:bug This is a clearly a bug priority:major labels Mar 15, 2023
@cxzl25
Copy link
Contributor

cxzl25 commented Mar 30, 2023

Can you help fix this? @lsm1

@lsm1
Copy link
Contributor

lsm1 commented Mar 31, 2023

Sure, I can try it.

@pan3793 pan3793 closed this as completed in f0796ec Apr 4, 2023
pan3793 pushed a commit that referenced this issue Apr 4, 2023
### _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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug priority:major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants