You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by agg212 <al...@brown.edu> on 2014/10/27 05:01:42 UTC
Spark SQL Exists Clause
Hey, I'm trying to run TPC-H Query 4 (shown below), and get the following
error:
Exception in thread "main" java.lang.RuntimeException: [11.25] failure:
``UNION'' expected but `select' found
It seems like Spark SQL doesn't support the exists clause. Is this true?
select
o_orderpriority,
count(*) as order_count
from
orders
where
o_orderdate >= date '1993-07-01'
and o_orderdate < date '1993-10-01'
and exists (
select
*
from
lineitem
where
l_orderkey = o_orderkey
and l_commitdate < l_receiptdate
)
group by
o_orderpriority
order by
o_orderpriority;
Thanks
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Spark-SQL-Exists-Clause-tp17307.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org
Re: Spark SQL Exists Clause
Posted by Nicholas Chammas <ni...@gmail.com>.
I believe that's correct. See:
http://spark.apache.org/docs/latest/sql-programming-guide.html#supported-hive-features
2014년 10월 27일 월요일, agg212<al...@brown.edu>님이 작성한 메시지:
> Hey, I'm trying to run TPC-H Query 4 (shown below), and get the following
> error:
>
> Exception in thread "main" java.lang.RuntimeException: [11.25] failure:
> ``UNION'' expected but `select' found
>
> It seems like Spark SQL doesn't support the exists clause. Is this true?
>
> select
> o_orderpriority,
> count(*) as order_count
> from
> orders
> where
> o_orderdate >= date '1993-07-01'
> and o_orderdate < date '1993-10-01'
> and exists (
> select
> *
> from
> lineitem
> where
> l_orderkey = o_orderkey
> and l_commitdate < l_receiptdate
> )
> group by
> o_orderpriority
> order by
> o_orderpriority;
>
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/Spark-SQL-Exists-Clause-tp17307.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org <javascript:;>
> For additional commands, e-mail: user-help@spark.apache.org <javascript:;>
>
>