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

    https://github.com/apache/spark/pull/5999#discussion_r29966685
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala ---
    @@ -81,12 +81,20 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] 
with Logging with Serializ
       /**
        * Runs this query returning the result as an RDD.
        */
    -  def execute(): RDD[Row]
    +  final def execute(): RDD[Row] = {
    +    RDDOperationScope.withScope(sparkContext, nodeName, false, true) {
    +      doExecute()
    +    }
    +  }
     
       /**
    -   * Runs this query returning the result as an array.
    +   * Runs this query returning the result as an RDD.
        */
    +  protected def doExecute(): RDD[Row]
     
    +  /**
    +   * Runs this query returning the result as an array.
    +   */
    --- End diff --
    
    Can you clarify in the scala doc here the purpose of the two methods.
    
    `execute()`: Returns the result of this query as an `RDD[Row]`.  This 
function is also responsible for adding query plan information to created RDDs 
for visualization.  Concrete implementations of `SparkPlan` should override 
`doExecute`.
    
    `doExecute()`: Overridden by concrete implementations of SparkPlan.  
Produces the result of the query as an `RDD[Row]`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to