You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2018/11/27 00:45:00 UTC
[jira] [Created] (IMPALA-7895) Incorrect expected results for
spillable-buffer-sizing.test
Paul Rogers created IMPALA-7895:
-----------------------------------
Summary: Incorrect expected results for spillable-buffer-sizing.test
Key: IMPALA-7895
URL: https://issues.apache.org/jira/browse/IMPALA-7895
Project: IMPALA
Issue Type: Bug
Components: Frontend
Affects Versions: Impala 3.0
Reporter: Paul Rogers
Assignee: Paul Rogers
A recent change appears to have caused a test to expect the wrong rewritten SQL in {{spillable-buffer-sizing.test}}.
{noformat}
# Mid NDV aggregation - should scale down buffers to intermediate size.
select straight_join l_orderkey, o_orderstatus, count(*)
from tpch_parquet.lineitem
join tpch_parquet.orders on o_orderkey = l_orderkey
group by 1, 2
having count(*) = 1
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=82.00MB Threads=7
Per-Host Resource Estimates: Memory=244MB
Analyzed query: SELECT
-- +straight_join
l_orderkey, o_orderstatus, count(*) FROM tpch_parquet.lineitem INNER JOIN
tpch_parquet.orders ON o_orderkey = l_orderkey GROUP BY CAST(1 AS INVALID_TYPE),
CAST(2 AS INVALID_TYPE) HAVING count(*) = CAST(1 AS BIGINT)
{noformat}
Correct rewritten SQL:
{noformat}
Analyzed query: SELECT
-- +straight_join
l_orderkey, o_orderstatus, count(*) FROM tpch_parquet.lineitem INNER JOIN
tpch_parquet.orders ON o_orderkey = l_orderkey GROUP BY l_orderkey,
o_orderstatus HAVING count(*) = CAST(1 AS BIGINT)
{noformat}
The same problem occurs in {{max-rows-test.test}}.
The problem is due to the existence of two copies of the grouping expressions. The {{toSql()}} function used the original, unanalyzed copy, not the rewritten copy with ordinal replacements.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)