Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1711#discussion_r159035696
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
 ---
    @@ -81,6 +84,13 @@ case class CarbonAlterTableCompactionCommand(
         carbonLoadModel.setDatabaseName(table.getDatabaseName)
         carbonLoadModel.setTablePath(table.getTablePath)
     
    +    val isLoadInProgress = 
SegmentStatusManager.checkIfAnyLoadInProgressForTable(table)
    +    if (isLoadInProgress) {
    +      LOGGER.error("Cannot run data loading and compaction on same table 
concurrently. Please wait"
    --- End diff --
    
    please make a `val msg = "msg"`, then use it in both logger and exception, 
so that you do not need to put duplicated string


---

Reply via email to