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

    https://github.com/apache/spark/pull/14181#discussion_r75448687
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -148,6 +148,21 @@ class SimpleTestOptimizer extends Optimizer(
       new SimpleCatalystConf(caseSensitiveAnalysis = true))
     
     /**
    + * Pushes projects down beneath Sample to enable column pruning with 
sampling.
    + */
    +object PushProjectThroughSample extends Rule[LogicalPlan] {
    +  def apply(plan: LogicalPlan): LogicalPlan = plan transform {
    +    // Push down projection into sample
    +    case proj @ Project(projectList, Sample(lb, up, replace, seed, child)) 
=>
    +      if (!replace || 
!projectList.exists(_.find(!_.deterministic).nonEmpty)) {
    --- End diff --
    
    yea, thanks! I'll fix this.


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