Skip to content

Commit

Permalink
fix PSQL schema generation in FQN
Browse files Browse the repository at this point in the history
  • Loading branch information
itsankit-google committed Jul 3, 2023
1 parent 94ec33f commit f2c1092
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"}};
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<commons-lang-version>2.6</commons-lang-version>
<commons-lang3-version>3.5</commons-lang3-version>
<commons-collections.version>3.2.2</commons-collections.version>
<cdap.version>6.9.0-SNAPSHOT</cdap.version>
<cdap.version>6.9.1</cdap.version>
<datastax.version>2.0.5</datastax.version>
<dumbster.version>1.6</dumbster.version>
<es.version>1.6.0</es.version>
Expand Down

0 comments on commit f2c1092

Please sign in to comment.