Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7535#discussion_r35230387
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
 ---
    @@ -38,99 +38,105 @@ trait CheckAnalysis {
         throw new AnalysisException(msg)
       }
     
    -  def containsMultipleGenerators(exprs: Seq[Expression]): Boolean = {
    +  protected def containsMultipleGenerators(exprs: Seq[Expression]): 
Boolean = {
         exprs.flatMap(_.collect {
    -      case e: Generator => true
    -    }).nonEmpty
    +      case e: Generator => e
    +    }).length > 1
       }
     
       def checkAnalysis(plan: LogicalPlan): Unit = {
         // We transform up and order the rules so as to catch the first 
possible failure instead
         // of the result of cascading resolution failures.
    -    plan.foreachUp {
    -
    -      case operator: LogicalPlan =>
    --- End diff --
    
    `case operator: LogicalPlan` catches all cases, so why not just use a 
normal function here instead of pattern match?


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