You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Pranav Yogi Lodha (Jira)" <ji...@apache.org> on 2022/05/18 09:01:00 UTC
[jira] [Created] (IMPALA-11299) Support window clause
Pranav Yogi Lodha created IMPALA-11299:
------------------------------------------
Summary: Support window clause
Key: IMPALA-11299
URL: https://issues.apache.org/jira/browse/IMPALA-11299
Project: IMPALA
Issue Type: Task
Reporter: Pranav Yogi Lodha
While writing tests for a statistical function, I found out that we don't support *window clause* unlike hive.
For a query with window clause :
select sum(p_size) over w1 as s1, sum(p_size) over (distribute by p_mfgr sort by p_name rows between current row and current row) as s2 from tpch.part window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following) limit 5;
*Hive produces the following output :*
+------+-----+
| s1 | s2 |
+------+-----+
| 40 | 4 |
| 82 | 16 |
| 122 | 20 |
| 153 | 42 |
| 178 | 40 |
+------+-----+
*While impala gives a syntax error :*
[localhost:21050] default> select sum(p_size) over w1 as s1, sum(p_size) over (distribute by p_mfgr sort by p_name rows between current row and current row) as s2 from tpch.part window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following) limit 5;
Query: select sum(p_size) over w1 as s1, sum(p_size) over (distribute by p_mfgr sort by p_name rows between current row and current row) as s2 from tpch.part window w1 as (distribute by p_mfgr sort by p_name rows between 2 preceding and 2 following) limit 5
Query submitted at: 2022-05-18 14:23:17 (Coordinator: http://pranavlodha-Precision-5560:25000)
ERROR: ParseException: Syntax error in line 1:
select sum(p_size) over w1 as s1, sum(p_size) over (...
^
Encountered: IDENTIFIER
Expected: (
CAUSED BY: Exception: Syntax error
[localhost:21050] default>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org