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

    https://github.com/apache/carbondata/pull/1508#discussion_r151410067
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateListeners.scala
 ---
    @@ -51,11 +51,39 @@ object LoadPostAggregateListener extends 
OperationEventListener {
             val childDatabaseName = 
dataMapSchema.getRelationIdentifier.getDatabaseName
             val selectQuery = dataMapSchema.getProperties.get("CHILD_SELECT 
QUERY")
             sparkSession.sql(s"insert into $childDatabaseName.$childTableName 
$selectQuery")
    +        
CarbonSession.threadUnset(CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
    +                                  carbonLoadModel.getDatabaseName + "." +
    +                                  carbonLoadModel.getTableName)
    +        
CarbonSession.threadUnset(CarbonCommonConstants.VALIDATE_CARBON_INPUT_SEGMENTS +
    +                                  carbonLoadModel.getDatabaseName + "." +
    +                                  carbonLoadModel.getTableName)
           }
         }
       }
     }
     
    +object LoadPreAggregateTablePreListener extends OperationEventListener {
    +  /**
    +   * Called on a specified event occurrence
    +   *
    +   * @param event
    +   * @param operationContext
    +   */
    +  override def onEvent(event: Event, operationContext: OperationContext): 
Unit = {
    +    val loadEvent = event.asInstanceOf[LoadTablePreExecutionEvent]
    +    val carbonLoadModel = loadEvent.carbonLoadModel
    +    val table = carbonLoadModel.getCarbonDataLoadSchema.getCarbonTable
    +    val carbonSessionInfo = ThreadLocalSessionInfo.getCarbonSessionInfo
    +    val isInternalLoadCall = 
carbonSessionInfo.getSessionParams.getAll.keySet().asScala
    --- End diff --
    
    Use specifc parameter instead of using this VALIDATE_CARBON_INPUT_SEGMENTS


---

Reply via email to