zkytech commented on code in PR #4443:
URL: https://github.com/apache/zeppelin/pull/4443#discussion_r945391927


##########
livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java:
##########
@@ -141,6 +171,10 @@ public InterpreterResult interpret(String line, 
InterpreterContext context) {
       if (result.code() == InterpreterResult.Code.SUCCESS) {
         InterpreterResult result2 = new 
InterpreterResult(InterpreterResult.Code.SUCCESS);
         for (InterpreterResultMessage message : result.message()) {
+          // when sql content is "use xxx", message.getData() is "df: 
org.apache.spark.sql.DataFrame = []"
+          if (message.getType() == InterpreterResult.Type.TEXT && 
message.getData().equals("df: org.apache.spark.sql.DataFrame = []")){

Review Comment:
   I have made a change in the latest submit, func `parseSQLJsonOutput` will 
return empty List (means empty table without header) when result message is 
less than 2 lines, and **all empty table without header** will be replaced by 
text `success`.



-- 
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: dev-unsubscr...@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to