From 803657cb5cb09891761af28a035e804afbb96f25 Mon Sep 17 00:00:00 2001 From: itsankit-google Date: Tue, 4 Jul 2023 00:20:53 +0530 Subject: [PATCH] fix PSQL schema generation in FQN --- database-plugins/pom.xml | 2 +- .../cdap/plugin/db/common/FQNGenerator.java | 4 ++-- .../db/batch/source/DBSourceTestRun.java | 2 +- http-plugins/pom.xml | 2 +- pom.xml | 20 +++++++++++++++++-- transform-plugins/pom.xml | 2 +- 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/database-plugins/pom.xml b/database-plugins/pom.xml index 069c21aef..7ff78d778 100644 --- a/database-plugins/pom.xml +++ b/database-plugins/pom.xml @@ -75,7 +75,7 @@ com.fasterxml.jackson.core jackson-databind test - 2.10.0 + 2.13.4.2 junit diff --git a/database-plugins/src/main/java/io/cdap/plugin/db/common/FQNGenerator.java b/database-plugins/src/main/java/io/cdap/plugin/db/common/FQNGenerator.java index f21a9360e..7d37504c4 100644 --- a/database-plugins/src/main/java/io/cdap/plugin/db/common/FQNGenerator.java +++ b/database-plugins/src/main/java/io/cdap/plugin/db/common/FQNGenerator.java @@ -50,8 +50,8 @@ private static String getPostgresqlSchema(String url) { */ String dbSchema; int offset = 0; - int startIndex = url.indexOf("connectionSchema="); - offset = 17; + int startIndex = url.indexOf("currentSchema="); + offset = 14; if (startIndex == -1) { startIndex = url.indexOf("searchpath="); offset = 11; diff --git a/database-plugins/src/test/java/io/cdap/plugin/db/batch/source/DBSourceTestRun.java b/database-plugins/src/test/java/io/cdap/plugin/db/batch/source/DBSourceTestRun.java index 2a6e4ede6..a3b7b7e5b 100644 --- a/database-plugins/src/test/java/io/cdap/plugin/db/batch/source/DBSourceTestRun.java +++ b/database-plugins/src/test/java/io/cdap/plugin/db/batch/source/DBSourceTestRun.java @@ -506,7 +506,7 @@ public void testPostgresqlFQN() throws Exception { // Testcases consist of Connection URL, Table Name, Expected FQN String String[][] testCases = {{"jdbc:postgresql://34.35.36.37/test?user=user&password=secret&ssl=true", "table1", "postgresql://34.35.36.37:5432/test.public.table1"}, - {"jdbc:postgresql://localhost/test?connectionSchema=schema", + {"jdbc:postgresql://localhost/test?currentSchema=schema", "table2", "postgresql://localhost:5432/test.schema.table2"}, {"jdbc:postgresql://localhost/test?searchpath=schema", "table3", "postgresql://localhost:5432/test.schema.table3"}}; diff --git a/http-plugins/pom.xml b/http-plugins/pom.xml index 80a21d9d6..834a606d5 100644 --- a/http-plugins/pom.xml +++ b/http-plugins/pom.xml @@ -68,7 +68,7 @@ com.fasterxml.jackson.core jackson-databind test - 2.10.0 + 2.13.4.2 diff --git a/pom.xml b/pom.xml index 4cd963a75..8f463c582 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ 2.6 3.5 3.2.2 - 6.9.0-SNAPSHOT + 6.9.1 2.0.5 1.6 1.6.0 @@ -124,7 +124,7 @@ 20160212 4.1.75.Final 1.3.0 - 3.1.1 + 3.3.2 ${project.basedir}/src/test/java/ @@ -774,10 +774,26 @@ log4j log4j + + org.apache.logging.log4j + log4j-slf4j-impl + org.apache.hadoop hadoop-client + + + org.apache.hadoop + hadoop-client-api + + + org.apache.hadoop + hadoop-client-runtime + com.esotericsoftware.reflectasm reflectasm diff --git a/transform-plugins/pom.xml b/transform-plugins/pom.xml index 78654e1d5..ea27e2017 100644 --- a/transform-plugins/pom.xml +++ b/transform-plugins/pom.xml @@ -72,7 +72,7 @@ com.fasterxml.jackson.core jackson-databind test - 2.10.0 + 2.13.4.2 io.cdap.cdap