Chris Matta created ZEPPELIN-639:
------------------------------------

             Summary: JDBCInterpreter should check for null
                 Key: ZEPPELIN-639
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-639
             Project: Zeppelin
          Issue Type: Improvement
          Components: Interpreters
    Affects Versions: 0.6.0
            Reporter: Chris Matta
            Priority: Minor


{{JDBCInterpreter.java}} should check for a null return on resultSet column 
instead of simply calling {{getString}}. Some incomplete, or poorly implemented 
JDBC drivers may not check for you. I've observed this behavior in the sqlline 
project.

Fix could be something like:
{code}
          while (resultSet.next() && displayRowCount < getMaxResult()) {
            for (int i = 1; i < md.getColumnCount() + 1; i++) {
              o = resultSet.getObject(i);
              if (o == null) {
                v = "null";
              } else {
                v = o.toString();
              }

              msg.append(replaceReservedChars(isTableType, v));
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to