Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1850#discussion_r163639577
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/CreatePreAggregateTableCommand.scala
---
@@ -157,8 +157,11 @@ case class CreatePreAggregateTableCommand(
// need to fire load for pre-aggregate table. Therefore reading the
load details for PARENT
// table.
val loadAvailable =
SegmentStatusManager.readLoadMetadata(parentTable.getMetaDataFilepath)
- .nonEmpty
- if (loadAvailable) {
+ if (loadAvailable.exists(load => load.getSegmentStatus ==
SegmentStatus.INSERT_IN_PROGRESS ||
--- End diff --
I think you should call
`DataLoadingUtil.deleteLoadsAndUpdateMetadata(isForceDeletion = false, table)`
before checking to make sure stale in-progress loads are removed and updated
the status file
---