ajantha-bhat commented on a change in pull request #3615: [CARBONDATA-3637] Use optimized insert flow for MV and insert stage command URL: https://github.com/apache/carbondata/pull/3615#discussion_r383661618
########## File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala ########## @@ -176,8 +176,21 @@ case class CarbonInsertIntoCommand(databaseNameOp: Option[String], convertedStaticPartition) scanResultRdd = sparkSession.sessionState.executePlan(newLogicalPlan).toRdd if (logicalPartitionRelation != null) { - logicalPartitionRelation = - getReArrangedSchemaLogicalRelation(reArrangedIndex, logicalPartitionRelation) + if (selectedColumnSchema.length != logicalPartitionRelation.output.length) { + throw new RuntimeException(" schema length doesn't match partition length") + } + var isAlreadyReArranged = true + var index = 0 + for (col: ColumnSchema <- selectedColumnSchema) { Review comment: done. used lambda and exists ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services