You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by cg...@apache.org on 2022/05/10 16:23:02 UTC

[drill] branch master updated: DRILL-8219: Handle null catalog names returned by DB2 in storage-jdbc. (#2542)

This is an automated email from the ASF dual-hosted git repository.

cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new 151d88cf27 DRILL-8219: Handle null catalog names returned by DB2 in storage-jdbc. (#2542)
151d88cf27 is described below

commit 151d88cf27aed51555406903b3947f208c09e1d5
Author: James Turton <91...@users.noreply.github.com>
AuthorDate: Tue May 10 18:22:57 2022 +0200

    DRILL-8219: Handle null catalog names returned by DB2 in storage-jdbc. (#2542)
---
 .../java/org/apache/drill/exec/store/jdbc/JdbcCatalogSchema.java     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcCatalogSchema.java b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcCatalogSchema.java
index 52721f6936..dce76aaebe 100644
--- a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcCatalogSchema.java
+++ b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcCatalogSchema.java
@@ -55,6 +55,11 @@ class JdbcCatalogSchema extends AbstractSchema {
       connectionSchemaName = con.getSchema();
       while (set.next()) {
         final String catalogName = set.getString(1);
+        if (catalogName == null) {
+          // DB2 is an example of why of this escape is needed.
+          continue;
+        }
+
         CapitalizingJdbcSchema schema = new CapitalizingJdbcSchema(
             getSchemaPath(), catalogName, source, dialect, convention, catalogName, null, caseSensitive);
         schemaMap.put(schema.getName(), schema);