Reamer commented on a change in pull request #4169: URL: https://github.com/apache/zeppelin/pull/4169#discussion_r667951650
########## File path: spark/spark1-shims/src/main/scala/org/apache/zeppelin/spark/Spark1Shims.java ########## @@ -81,17 +82,28 @@ public String showDataFrame(Object obj, int maxResult, InterpreterContext contex } } + InterpreterResult.Type outputType = InterpreterResult.Type.TABLE; + String sql = context.getLocalProperties().get("sql"); + if (StringUtils.isNotBlank(sql) && sql.trim().toLowerCase().startsWith("explain")) { + outputType = InterpreterResult.Type.TEXT; + } + StringBuilder msg = new StringBuilder(); - msg.append("\n%table "); + msg.append("\n%" + outputType.toString().toLowerCase() + " "); Review comment: You may be right, but I get the following suggestion in intellij when using StringBuilder and normal string concatenation.  ########## File path: spark/spark1-shims/src/main/scala/org/apache/zeppelin/spark/Spark1Shims.java ########## @@ -81,17 +82,28 @@ public String showDataFrame(Object obj, int maxResult, InterpreterContext contex } } + InterpreterResult.Type outputType = InterpreterResult.Type.TABLE; + String sql = context.getLocalProperties().get("sql"); + if (StringUtils.isNotBlank(sql) && sql.trim().toLowerCase().startsWith("explain")) { + outputType = InterpreterResult.Type.TEXT; + } + StringBuilder msg = new StringBuilder(); - msg.append("\n%table "); + msg.append("\n%" + outputType.toString().toLowerCase() + " "); Review comment: I thought you were also using Intellij. Don't you get the comment in your IDE? -- 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