Reamer commented on code in PR #4730:
URL: https://github.com/apache/zeppelin/pull/4730#discussion_r1524618643
##########
jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java:
##########
@@ -217,21 +217,20 @@ public static Set<String>
getSqlKeywordsCompletions(DatabaseMetaData meta) throw
Set<String> completions = new TreeSet<>();
if (null != meta) {
- // Add the driver specific SQL completions
- String driverSpecificKeywords =
- "/" + meta.getDriverName().replace(" ", "-").toLowerCase() +
"-sql.keywords";
- logger.info("JDBC DriverName:" + driverSpecificKeywords);
try {
+ // Add the driver specific SQL completions
+ String driverSpecificKeywords =
+ "/" + meta.getDriverName().replace(" ", "-").toLowerCase() +
"-sql.keywords";
+ logger.info("JDBC DriverName: {}", driverSpecificKeywords);
if (SqlCompleter.class.getResource(driverSpecificKeywords) != null) {
String driverKeywords =
new BufferedReader(new InputStreamReader(
SqlCompleter.class.getResourceAsStream(driverSpecificKeywords)))
.readLine();
keywords += "," + driverKeywords.toUpperCase();
}
- } catch (Exception e) {
- logger.debug("fail to get driver specific SQL completions for " +
- driverSpecificKeywords + " : " + e, e);
+ } catch (IOException | SQLException e) {
+ logger.debug("fail to get driver specific SQL completions for " +
meta.getClass().getName() + " : " + e, e);
Review Comment:
```suggestion
logger.debug("fail to get driver specific SQL completions for " +
meta.getClass().getName() + " : " + e, e);
```
##########
jdbc/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java:
##########
@@ -217,21 +217,20 @@ public static Set<String>
getSqlKeywordsCompletions(DatabaseMetaData meta) throw
Set<String> completions = new TreeSet<>();
if (null != meta) {
- // Add the driver specific SQL completions
- String driverSpecificKeywords =
- "/" + meta.getDriverName().replace(" ", "-").toLowerCase() +
"-sql.keywords";
- logger.info("JDBC DriverName:" + driverSpecificKeywords);
try {
+ // Add the driver specific SQL completions
+ String driverSpecificKeywords =
+ "/" + meta.getDriverName().replace(" ", "-").toLowerCase() +
"-sql.keywords";
+ logger.info("JDBC DriverName: {}", driverSpecificKeywords);
if (SqlCompleter.class.getResource(driverSpecificKeywords) != null) {
String driverKeywords =
new BufferedReader(new InputStreamReader(
SqlCompleter.class.getResourceAsStream(driverSpecificKeywords)))
.readLine();
keywords += "," + driverKeywords.toUpperCase();
}
- } catch (Exception e) {
- logger.debug("fail to get driver specific SQL completions for " +
- driverSpecificKeywords + " : " + e, e);
+ } catch (IOException | SQLException e) {
+ logger.debug("fail to get driver specific SQL completions for " +
meta.getClass().getName() + " : " + e, e);
Review Comment:
CI Error:
```
[INFO] There is 1 error reported by Checkstyle 6.11.2 with
zeppelin/checkstyle.xml ruleset.
Error: src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java:[233]
(sizes) LineLength: Line is longer than 100 characters (found 116).
```
--
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]