Reamer commented on code in PR #4730:
URL: https://github.com/apache/zeppelin/pull/4730#discussion_r1524554242
##########
jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java:
##########
@@ -217,11 +217,11 @@ public static Set<String>
getSqlKeywordsCompletions(DatabaseMetaData meta) throw
Set<String> completions = new TreeSet<>();
if (null != meta) {
Review Comment:
Are you sure that the call `getDriverName()` throws an NPE? Looking at the
code, I think that the call `getDriverName().replace('...')` throws the NPE
because `getDriverName()` returns null.
I have looked at the implementation of the Hive driver. I hope I have found
the right place.
https://github.com/apache/hive/blob/489f6a20a5eedc1836854fd40255eb78aa967d99/jdbc/src/java/org/apache/hive/jdbc/HiveDriver.java#L264-L303
I don't see any possibility that an NPE is thrown. But an SQL exception can
be thrown. To do this, `loadManifestAttributes();` would have to throw an
IOException -> then the `SQL-Exception` is thrown.
##########
jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java:
##########
@@ -217,11 +217,11 @@ public static Set<String>
getSqlKeywordsCompletions(DatabaseMetaData meta) throw
Set<String> completions = new TreeSet<>();
if (null != meta) {
Review Comment:
I didn't realize that `getDriverName()` can throw an `SQLException`, so I'm
closing this suggestion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]