You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "hexianqing (Jira)" <ji...@apache.org> on 2020/01/19 10:55:00 UTC
[jira] [Created] (IMPALA-9305) Having clause of outer joined inline
view evaluate twice
hexianqing created IMPALA-9305:
----------------------------------
Summary: Having clause of outer joined inline view evaluate twice
Key: IMPALA-9305
URL: https://issues.apache.org/jira/browse/IMPALA-9305
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Affects Versions: Impala 3.3.0
Reporter: hexianqing
Attachments: image-2020-01-19-18-38-49-954.png
For outer joined inline view, the having clause evaluate twice.
Query:
{code}
select a.id, b.id
from functional.alltypes a left join
(select id, int_col from functional.alltypes group by 1, 2 having int_col = 17) b on (a.id = b.id)
{code}
Explain :
{noformat}
+------------------------------------------------------------+
| Explain String |
+------------------------------------------------------------+
| Max Per-Host Resource Reservation: Memory=5.94MB Threads=6 |
| Per-Host Resource Estimates: Memory=150MB |
| Codegen disabled by planner |
| |
| PLAN-ROOT SINK |
| | |
| 07:EXCHANGE [UNPARTITIONED] |
| | |
| 03:HASH JOIN [LEFT OUTER JOIN, BROADCAST] |
| | hash predicates: a.id = id |
| | row-size=12B cardinality=7.30K |
| | |
| |--06:EXCHANGE [BROADCAST] |
| | | |
| | 05:AGGREGATE [FINALIZE] |
| | | group by: id, int_col |
| | | having: int_col = 17 |
| | | row-size=8B cardinality=73 |
| | | |
| | 04:EXCHANGE [HASH(id,int_col)] |
| | | |
| | 02:AGGREGATE [STREAMING] |
| | | group by: id, int_col |
| | | row-size=8B cardinality=730 |
| | | |
| | 01:SCAN HDFS [functional.alltypes] |
| | HDFS partitions=24/24 files=24 size=478.45KB |
| | predicates: functional.alltypes.int_col = 17 |
| | row-size=8B cardinality=730 |
| | |
| 00:SCAN HDFS [functional.alltypes a] |
| HDFS partitions=24/24 files=24 size=478.45KB |
| row-size=4B cardinality=7.30K |
+------------------------------------------------------------+
{noformat}
The predicate int_col = 17 are already evaluated in scan node.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)