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 2020/05/06 07:12:36 UTC
[GitHub] [zeppelin] zjffdu opened a new pull request #3764: [ZEPPELIN-4797]. Enable multiple sql in jdbc interpreter by default
zjffdu opened a new pull request #3764:
URL: https://github.com/apache/zeppelin/pull/3764
### What is this PR for?
Before this PR, user have to set property `default.splitQueries` to enable multiple queries in one paragraph, this PR remove this property, this PR remove this property, and make multiple sql query in support by default.
### What type of PR is it?
[Feature | Documentation]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4797
### How should this be tested?
* Unit test is updated
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
----------------------------------------------------------------
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
[GitHub] [zeppelin] alexott commented on a change in pull request #3764: [ZEPPELIN-4797]. Enable multiple sql in jdbc interpreter by default
Posted by GitBox <gi...@apache.org>.
alexott commented on a change in pull request #3764:
URL: https://github.com/apache/zeppelin/pull/3764#discussion_r420597759
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -695,17 +688,7 @@ private InterpreterResult executeSql(String propertyKey, String sql,
}
try {
- List<String> sqlArray;
- sql = sql.trim();
- if (splitQuery) {
- sqlArray = sqlSplitter.splitSql(sql);
- } else {
- if (sql.endsWith(";")) {
- sql = sql.substring(0, sql.length() - 1);
- }
- sqlArray = Arrays.asList(sql);
- }
-
+ List<String> sqlArray = sqlSplitter.splitSql(sql);
for (int i = 0; i < sqlArray.size(); i++) {
String sqlToExecute = sqlArray.get(i);
Review comment:
for-each loop would look nicer :-)
----------------------------------------------------------------
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
[GitHub] [zeppelin] zjffdu commented on a change in pull request #3764: [ZEPPELIN-4797]. Enable multiple sql in jdbc interpreter by default
Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3764:
URL: https://github.com/apache/zeppelin/pull/3764#discussion_r420608985
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -695,17 +688,7 @@ private InterpreterResult executeSql(String propertyKey, String sql,
}
try {
- List<String> sqlArray;
- sql = sql.trim();
- if (splitQuery) {
- sqlArray = sqlSplitter.splitSql(sql);
- } else {
- if (sql.endsWith(";")) {
- sql = sql.substring(0, sql.length() - 1);
- }
- sqlArray = Arrays.asList(sql);
- }
-
+ List<String> sqlArray = sqlSplitter.splitSql(sql);
for (int i = 0; i < sqlArray.size(); i++) {
Review comment:
addressed
----------------------------------------------------------------
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
[GitHub] [zeppelin] Reamer commented on a change in pull request #3764: [ZEPPELIN-4797]. Enable multiple sql in jdbc interpreter by default
Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #3764:
URL: https://github.com/apache/zeppelin/pull/3764#discussion_r420596790
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -695,17 +688,7 @@ private InterpreterResult executeSql(String propertyKey, String sql,
}
try {
- List<String> sqlArray;
- sql = sql.trim();
- if (splitQuery) {
- sqlArray = sqlSplitter.splitSql(sql);
- } else {
- if (sql.endsWith(";")) {
- sql = sql.substring(0, sql.length() - 1);
- }
- sqlArray = Arrays.asList(sql);
- }
-
+ List<String> sqlArray = sqlSplitter.splitSql(sql);
for (int i = 0; i < sqlArray.size(); i++) {
Review comment:
a [For-Each Loop](https://docs.oracle.com/javase/8/docs/technotes/guides/language/foreach.html) would be nicer
----------------------------------------------------------------
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