AngersZhuuuu edited a comment on issue #26437: [SPARK-29800][SQL] Plan Exists 
's subquery in PlanSubqueries
URL: https://github.com/apache/spark/pull/26437#issuecomment-552339571
 
 
   > do you mean something like `RDD.take`? e.g. we can execute the first 
partition, if it's non-empty, return true, otherwise, execute more partitions
   
   Yea, what I want.
   Since for `LIMIT 1`, plan as `CollectLimitExec`, it will execute all 
partition then collect local limit ,then collect global limit. 
   ```
    execute the first partition, if it's non-empty, return true, otherwise, 
execute more partitions
   ```
   In this way, we can reduce the subquery's minimize expenses.
   
   ```
     def updateResult(): Unit = {
       result = plan.executeTake(1) == 1
       resultBroadcast = plan.sqlContext.sparkContext.broadcast[Boolean](result)
     }
   ```
   This way is ok?
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to