zkytech commented on code in PR #4443: URL: https://github.com/apache/zeppelin/pull/4443#discussion_r945385230
########## 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: when sql content is DDL and tableWithUTFCharacter, message.getData() is: ``` df: org.apache.spark.sql.DataFrame = [] ``` which will lead to OutOfIndexException at [here](https://github.com/apache/zeppelin/blob/d2cdb77f6ae6a13ff9c770b82d7125270415a77c/livy/src/main/java/org/apache/zeppelin/livy/LivySparkSQLInterpreter.java?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L183) when sql content is DDL and tableWithUTFCharacter, message.getData() is: ``` ++ || ++ ++ ``` which means an empty table without header > Why ignore this kind of message? What is the output if you run sql statements in spark-sql client side? -- 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