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

[GitHub] [carbondata] akashrn5 commented on a change in pull request #4151: [CARBONDATA-4211] Fix - from xx Insert into select fails if an SQL statement contains multiple inserts

akashrn5 commented on a change in pull request #4151:
URL: https://github.com/apache/carbondata/pull/4151#discussion_r652433296



##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala
##########
@@ -294,6 +294,13 @@ case class CarbonInsertIntoCommand(databaseNameOp: Option[String],
         }
         throw ex
     }
+    if (internalOptions.contains("isMultipleInserts")) {
+      if (internalOptions.get("isMultipleInserts").get.toBoolean) {
+        // when multiple insert statements are given with single plan (Union),
+        // no need to return segment id as row.
+        return Seq.empty

Review comment:
       here we are returning the segment ID from load command so that the application code integrated with carbondata can take decisions based on that. So if we don't return in this case, we will not give valid info to underlying application and may lead to wrong decision by applications if they were taking any. So we cant fix it like this




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