jackylk commented on a change in pull request #3432: [CARBONDATA-3567] Added validation for compacting mixed format segments
URL:
https://github.com/apache/carbondata/pull/3432#discussion_r342405068
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
##########
@@ -276,7 +276,20 @@ case class CarbonAlterTableCompactionCommand(
val isCompactionTriggerByDDl = true
val segmentIds: Option[List[String]] = if (compactionType == CompactionType.CUSTOM &&
alterTableModel.customSegmentIds.isDefined) {
- alterTableModel.customSegmentIds
+ val ids = alterTableModel.customSegmentIds
+ if (ids != None) {
+ val loadMetadataDetails = carbonLoadModel.getLoadMetadataDetails.asScala
+ for (oneLoad <- loadMetadataDetails) {
Review comment:
Try best not to use `for` loop in Scala.
You can first filter out the load by matching the id and check whether it is carbon format
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services