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

    https://github.com/apache/spark/pull/10630#discussion_r49043992
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -966,6 +952,27 @@ object ReplaceDistinctWithAggregate extends 
Rule[LogicalPlan] {
     }
     
     /**
    + * Replaces logical [[Intersect]] operator with a left-semi [[Join]] 
operator.
    + * {{{
    + *   SELECT a1, a2 FROM Tab1 INTERSECT SELECT b1, b2 FROM Tab2
    + *   ==>  SELECT a1, a2 FROM Tab1, Tab2 ON a1<=>b1 AND a2<=>b2
    + * }}}
    + */
    +object ReplaceIntersectWithLeftSemi extends Rule[LogicalPlan] {
    +  private def buildCond (left: LogicalPlan, right: LogicalPlan): 
Seq[Expression] = {
    +    require(left.output.length == right.output.length)
    --- End diff --
    
    can you look into the analyzer to make sure we have the proper check there 
for intersect/except?



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