spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hareesh makam <makamhare...@gmail.com>
Subject Re: Is there "EXCEPT ALL" in Spark SQL?
Date Thu, 06 Jul 2017 19:48:18 GMT
There is Except in DataFrame API.

df1.except(df2)

Same can be used in SQL as well.

public DataFrame
<https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/DataFrame.html>
except(DataFrame
<https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/DataFrame.html>
other)

Returns a new DataFrame
<https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/DataFrame.html>
containing
rows in this frame but not in another frame. This is equivalent to EXCEPT in
SQL.


-Hareesh


On 6 July 2017 at 12:22, jeff saremi <jeffsaremi@hotmail.com> wrote:

> I tried this query in 1.6 and it failed:
>
> SELECT * FROM Table1 EXCEPT ALL SELECT * FROM Table2
>
>
> Exception in thread "main" java.lang.RuntimeException: [1.32] failure:
> ``('' expected but `all' found
>
>
> thanks
>
> Jeff
>

Mime
View raw message