spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sathiyapk <...@git.apache.org>
Subject [GitHub] spark pull request #19451: SPARK-22181 Adds ReplaceExceptWithNotFilter rule
Date Fri, 06 Oct 2017 20:40:58 GMT
Github user sathiyapk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19451#discussion_r143289752
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
---
    @@ -1242,6 +1243,53 @@ object ReplaceIntersectWithSemiJoin extends Rule[LogicalPlan] {
     }
     
     /**
    + * If one or both of the datasets in the logical [[Except]] operator are purely transformed
using
    + * [[Filter]], this rule will replace logical [[Except]] operator with a [[Filter]] operator
by
    + * flipping the filter condition of the right child.
    + * {{{
    + *   SELECT a1, a2 FROM Tab1 WHERE a2 = 12 EXCEPT SELECT a1, a2 FROM Tab1 WHERE a1 =
5
    + *   ==>  SELECT a1, a2 FROM Tab1 WHERE a2 = 12 AND a1 <> 5
    --- End diff --
    
    @gatorsmile Thanks for the comment. Sorry i didn't pay attention, i'll update the query
example. But the code produces the correct behaviour of the Except operator. Do you have any
comment in the code? 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message