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

    https://github.com/apache/carbondata/pull/2591#discussion_r206780781
  
    --- Diff: 
integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala
 ---
    @@ -457,17 +458,31 @@ class CarbonScanRDD[T: ClassTag](
             }
           }
     
    +      // create a statistics recorder
    +      val recorder = 
CarbonTimeStatisticsFactory.createExecutorRecorder(model.getQueryId())
    +      model.setStatisticsRecorder(recorder)
    +
    +      // TODO: rewrite this logic to call free memory in FailureListener 
on failures. On success,
    +      // no memory leak should be there, resources should be freed on 
success completion.
    +      val listeners = 
CarbonReflectionUtils.getField("onCompleteCallbacks", context)
    +        .asInstanceOf[ArrayBuffer[TaskCompletionListener]]
    +      val isAdded = listeners.exists(p => 
p.isInstanceOf[InsertTaskCompletionListener])
    +      if (isAdded) {
    --- End diff --
    
    If condition is not required


---

Reply via email to