akashrn5 commented on a change in pull request #3856: URL: https://github.com/apache/carbondata/pull/3856#discussion_r474501846
########## File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/merge/CarbonMergeDataSetCommand.scala ########## @@ -194,29 +210,32 @@ case class CarbonMergeDataSetCommand( tuple._2.asJava) } } - Some(UpdateTableModel(true, trxMgr.getLatestTrx, - executorErrors, tuple._2, true)) + Some(UpdateTableModel(isUpdate = true, trxMgr.getLatestTrx, + executorErrors, tuple._2, loadAsNewSegment = true)) } else { None } - CarbonInsertIntoWithDf( - databaseNameOp = Some(carbonTable.getDatabaseName), + val dataFrame = loadDF.select(tableCols.map(col): _*) + CarbonInsertIntoCommand(databaseNameOp = Some(carbonTable.getDatabaseName), tableName = carbonTable.getTableName, - options = Map("fileheader" -> header, "sort_scope" -> "nosort"), + options = Map("fileheader" -> header, "sort_scope" -> "no_sort"), Review comment: if we focus on the cdc performance, existing no sort is fine. As your point, we can't blindly go with target table's sort scope, because it can happen that the target table has the sort scope has no sort. ---------------------------------------------------------------- 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