You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (JIRA)" <ji...@apache.org> on 2017/11/12 16:14:01 UTC
[jira] [Created] (SPARK-22497) Reuse project
Yuming Wang created SPARK-22497:
-----------------------------------
Summary: Reuse project
Key: SPARK-22497
URL: https://issues.apache.org/jira/browse/SPARK-22497
Project: Spark
Issue Type: Sub-task
Components: SQL
Affects Versions: 2.3.0
Reporter: Yuming Wang
The below SQL will scan {{table1}} twice. It can reuse the first Project.
{code:sql}
with p1 as (select * from table1 where key < 100),
s1 as (SELECT key, count(*) FROM p1 group by key),
s2 as (SELECT key, count(*) FROM p1 where key > -100 group by key)
select s1.* from s1 join s2 on s1.key= s2.key
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org