Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/18159
  
    After think about it more, I think the problem we need to solve here is to 
support metrics for `RunnableCommand`. My previous refactor fixed the problem 
to support children in `RunnableCommand`.
    
    My proposal:
    ```
    trait RunnableCommand {
      val metrics: Map[String, SQLMetric] = Map.empty
      ...
    }
    
    case class ExecutedCommandExec(
        cmd: RunnableCommand,
        children: Seq[SparkPlan],
        override val metrics: Map[String, SQLMetric])
    ```
    
    In `InsertIntoHadoopFsRelationCommand` we can override the  `metrics` and 
update it according to `FileFormatWritter`. And in the planner we pass 
`RunnableCommand.metrics` to `ExecutedCommandExec`


---
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