Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-639

JDBCInterpreter should check for null

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.6.0
    • Component/s: Interpreters
    • Labels:

      Description

      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:

                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));
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cmatta Chris Matta

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment