You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/06/21 14:16:46 UTC

[GitHub] [zeppelin] cuspymd commented on a change in pull request #4143: [ZEPPELIN-5311] Unable to run list & add hive statement

cuspymd commented on a change in pull request #4143:
URL: https://github.com/apache/zeppelin/pull/4143#discussion_r655416528



##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -727,12 +727,14 @@ private InterpreterResult executeSql(String dbPrefix, String sql,
     try {
       List<String>  sqlArray = sqlSplitter.splitSql(sql);
       for (String sqlToExecute : sqlArray) {
-        LOGGER.info("Execute sql: " + sqlToExecute);
-        if (sqlToExecute.trim().toLowerCase().startsWith("set ")) {
+        if (sqlToExecute.trim().toLowerCase().startsWith("set ") ||
+                sqlToExecute.trim().toLowerCase().startsWith("list ") ||
+                sqlToExecute.trim().toLowerCase().startsWith("add ")) {

Review comment:
       It would be good to move `sqlToExecute.trim().toLowerCase()` out of `if` statement.
   Anyway, which sql language has `list` keyword?




-- 
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.

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