diff --git a/beeline/src/java/org/apache/hive/beeline/Commands.java b/beeline/src/java/org/apache/hive/beeline/Commands.java index 90cae9f408..fd0af2ca0c 100644 --- a/beeline/src/java/org/apache/hive/beeline/Commands.java +++ b/beeline/src/java/org/apache/hive/beeline/Commands.java @@ -1052,7 +1052,9 @@ private boolean executeInternal(String sql, boolean call) { logThread.interrupt(); } logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT); - showRemainingLogsIfAny(stmnt); + if (stmnt != null) { + showRemainingLogsIfAny(stmnt); + } } if (stmnt != null) { stmnt.close(); diff --git a/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java b/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java index 8482f85b00..42f2debb9e 100644 --- a/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java +++ b/beeline/src/java/org/apache/hive/beeline/TableOutputFormat.java @@ -116,6 +116,10 @@ ColorBuffer getOutputString(Rows rows, Rows.Row row, String delim) { if (buf.getVisibleLength() > 0) { buf.green(delim); } + + if (row.values[i] == null) { + continue; + } ColorBuffer v;