From 192da2c0d6ee4bb48f511ac96963039d811eb85f Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Fri, 29 Mar 2024 00:58:06 +0800 Subject: [PATCH 1/4] Support Apache Kyuubi as built-in datasource (#1336) * Add Kyuubi driver JDBC driver 1.9.0 --------- Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- .../plugin.xml | 3 +++ server/drivers/kyuubi/pom.xml | 25 +++++++++++++++++++ server/drivers/pom.xml | 1 + 3 files changed, 29 insertions(+) create mode 100644 server/drivers/kyuubi/pom.xml diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml b/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml index 46cd997963..cbd9c57a41 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml @@ -17,6 +17,7 @@ + @@ -36,6 +37,7 @@ + @@ -55,6 +57,7 @@ + diff --git a/server/drivers/kyuubi/pom.xml b/server/drivers/kyuubi/pom.xml new file mode 100644 index 0000000000..d59c25552b --- /dev/null +++ b/server/drivers/kyuubi/pom.xml @@ -0,0 +1,25 @@ + + 4.0.0 + drivers.kyuubi + 1.0.0 + + io.cloudbeaver + drivers + 1.0.0 + ../ + + + + kyuubi + + + + + org.apache.kyuubi + kyuubi-hive-jdbc-shaded + 1.9.0 + + + + diff --git a/server/drivers/pom.xml b/server/drivers/pom.xml index 2d5d4b3718..39fecc0302 100644 --- a/server/drivers/pom.xml +++ b/server/drivers/pom.xml @@ -18,6 +18,7 @@ h2 h2_v2 jaybird + kyuubi mysql mariadb oracle From 77f531ddac37fdde70ac4be71567994ced09c6ea Mon Sep 17 00:00:00 2001 From: Isa Inalcik Date: Thu, 28 Mar 2024 17:58:42 +0100 Subject: [PATCH 2/4] Update trino driver to 438 (#2372) Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> Co-authored-by: Anastasiya <45152336+LonwoLonwo@users.noreply.github.com> --- server/drivers/trino/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/drivers/trino/pom.xml b/server/drivers/trino/pom.xml index d2c5220ece..6664afd89a 100644 --- a/server/drivers/trino/pom.xml +++ b/server/drivers/trino/pom.xml @@ -18,7 +18,7 @@ io.trino trino-jdbc - 422 + 438 From 66f6ccb2457d6fdffbe3a13164ea8d90112c7093 Mon Sep 17 00:00:00 2001 From: Ainur <59531286+yagudin10@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:59:53 +0100 Subject: [PATCH 3/4] CB-4569 set default database when getting driver props (#2512) Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com> --- .../src/io/cloudbeaver/model/WebDatabaseDriverInfo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java index a0d4602162..61f0a8e970 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java @@ -182,6 +182,7 @@ public WebPropertyInfo[] getDriverProperties() throws DBWebException { cfg.setUrl(driver.getSampleURL()); cfg.setHostName(DBConstants.HOST_LOCALHOST); cfg.setHostPort(driver.getDefaultPort()); + cfg.setDatabaseName(driver.getDefaultDatabase()); cfg.setUrl(driver.getConnectionURL(cfg)); DBPPropertyDescriptor[] properties = driver.getDataSourceProvider().getConnectionProperties(webSession.getProgressMonitor(), driver, cfg); if (properties == null) { From 8004db0f8b3d8e23456bbc6b61b45cc7f1320669 Mon Sep 17 00:00:00 2001 From: Ainur <59531286+yagudin10@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:00:45 +0100 Subject: [PATCH 4/4] CB-4919 update results fix (#2509) --- .../src/io/cloudbeaver/service/sql/WebSQLProcessor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java index 08e199f930..a6b01c916d 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java @@ -364,9 +364,16 @@ public WebSQLExecuteInfo updateResultsDataBatch( isAutoCommitEnabled = txnManager.isAutoCommit(); if (txnManager.isSupportsTransactions() && isAutoCommitEnabled) { txnManager.setAutoCommit(monitor, false); - savepoint = txnManager.setSavepoint(monitor, null); revertToAutoCommit = true; } + if (!txnManager.isAutoCommit() && txnManager.supportsSavepoints()) { + try { + savepoint = txnManager.setSavepoint(monitor, null); + } catch (Throwable e) { + // May be savepoints not supported + log.debug("Can't set savepoint", e); + } + } } try { Map options = Collections.emptyMap();