From 997d72a1cda94e8ea9a43ac5fe341dcfa75ffd67 Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Fri, 24 Sep 2021 10:25:13 +0800 Subject: [PATCH] [KYUUBI #884][FOLLOWUP] Fix catalog in KyuubiDatabaseMetaData#getTables ### _Why are the changes needed?_ The behavior of `KyuubiDatabaseMetaData#getTables` changed by accident in #884[1], this PR restores the method's previous behavior and adds multi-catalog test case to verify it works as expected. [1] [This](https://github.com/apache/incubator-kyuubi/commit/1a8b4ebaaeb8308018cab0c65497c74bc38f4a85#diff-c540737d1b293b909d07d50a05f67d35d274bc3163d723409135634a575e5e9dR68) makes KyuubiDatabaseMetaData#getTables method make no sense, just invokes the superclass. ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1133 from pan3793/jdbc. Closes #884 f02327d9 [Cheng Pan] add provided scala-library 3702a08a [Cheng Pan] nit 18045a92 [Cheng Pan] Fix test jars scope edd1ca8f [Cheng Pan] Address comments 3fecbf5b [Cheng Pan] Clean withKyuubiConf instead of extraConfigs 45e7bd19 [Cheng Pan] nit f19def37 [Cheng Pan] [KYUUBI #884][FOLLOWUP] Fix catalog in KyuubiDatabaseMetaData#getTables Authored-by: Cheng Pan Signed-off-by: Cheng Pan --- kyuubi-hive-jdbc/pom.xml | 14 ++++++ .../kyuubi/jdbc/KyuubiDatabaseMetaData.java | 3 +- .../kyuubi/jdbc/KyuubiDriverSuite.scala | 50 +++++++++++++------ 3 files changed, 51 insertions(+), 16 deletions(-) diff --git a/kyuubi-hive-jdbc/pom.xml b/kyuubi-hive-jdbc/pom.xml index ec057e2cf..27712a0d4 100644 --- a/kyuubi-hive-jdbc/pom.xml +++ b/kyuubi-hive-jdbc/pom.xml @@ -34,6 +34,11 @@ jar + + org.scala-lang + scala-library + provided + org.apache.hive @@ -70,6 +75,7 @@ kyuubi-common_${scala.binary.version} ${project.version} test-jar + test @@ -78,11 +84,13 @@ ${project.version} test + org.apache.kyuubi kyuubi-spark-sql-engine_${scala.binary.version} ${project.version} test-jar + test @@ -91,6 +99,12 @@ test + + org.apache.iceberg + ${iceberg.name} + test + +