This is an automated email from the ASF dual-hosted git repository.

suyue pushed a commit to branch empty_batch_insert
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit f65499d064e88302f85601d6dceca450cb7c6ce9
Author: suyue <[email protected]>
AuthorDate: Mon May 27 18:41:08 2019 +0800

    comment batch statement
---
 .../org/apache/iotdb/db/service/TSServiceImpl.java | 54 +++++++++++-----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java 
b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index 592b009..5a0c847 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -444,33 +444,33 @@ public class TSServiceImpl implements TSIService.Iface, 
ServerContext {
       boolean isAllSuccessful = true;
       String batchErrorMessage = "";
 
-      for (String statement : statements) {
-        try {
-          PhysicalPlan physicalPlan = 
processor.parseSQLToPhysicalPlan(statement, zoneIds.get());
-          physicalPlan.setProposer(username.get());
-          if (physicalPlan.isQuery()) {
-            return getTSBathExecuteStatementResp(TS_StatusCode.ERROR_STATUS,
-                "statement is query :" + statement, result);
-          }
-          TSExecuteStatementResp resp = executeUpdateStatement(physicalPlan);
-          if 
(resp.getStatus().getStatusCode().equals(TS_StatusCode.SUCCESS_STATUS)) {
-            result.add(Statement.SUCCESS_NO_INFO);
-          } else {
-            result.add(Statement.EXECUTE_FAILED);
-            isAllSuccessful = false;
-            batchErrorMessage = resp.getStatus().getErrorMessage();
-          }
-        } catch (Exception e) {
-          String errMessage = String.format(
-              "Fail to generate physcial plan and execute for statement "
-                  + "%s beacuse %s",
-              statement, e.getMessage());
-          LOGGER.warn("Error occurred when executing {}", statement, e);
-          result.add(Statement.EXECUTE_FAILED);
-          isAllSuccessful = false;
-          batchErrorMessage = errMessage;
-        }
-      }
+//      for (String statement : statements) {
+//        try {
+//          PhysicalPlan physicalPlan = 
processor.parseSQLToPhysicalPlan(statement, zoneIds.get());
+//          physicalPlan.setProposer(username.get());
+//          if (physicalPlan.isQuery()) {
+//            return getTSBathExecuteStatementResp(TS_StatusCode.ERROR_STATUS,
+//                "statement is query :" + statement, result);
+//          }
+//          TSExecuteStatementResp resp = executeUpdateStatement(physicalPlan);
+//          if 
(resp.getStatus().getStatusCode().equals(TS_StatusCode.SUCCESS_STATUS)) {
+//            result.add(Statement.SUCCESS_NO_INFO);
+//          } else {
+//            result.add(Statement.EXECUTE_FAILED);
+//            isAllSuccessful = false;
+//            batchErrorMessage = resp.getStatus().getErrorMessage();
+//          }
+//        } catch (Exception e) {
+//          String errMessage = String.format(
+//              "Fail to generate physcial plan and execute for statement "
+//                  + "%s beacuse %s",
+//              statement, e.getMessage());
+//          LOGGER.warn("Error occurred when executing {}", statement, e);
+//          result.add(Statement.EXECUTE_FAILED);
+//          isAllSuccessful = false;
+//          batchErrorMessage = errMessage;
+//        }
+//      }
       if (isAllSuccessful) {
         return getTSBathExecuteStatementResp(TS_StatusCode.SUCCESS_STATUS,
             "Execute batch statements successfully", result);

Reply via email to