You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Jian Zhang (Jira)" <ji...@apache.org> on 2022/07/05 14:14:00 UTC
[jira] [Created] (IMPALA-11417) support outer join elimination
Jian Zhang created IMPALA-11417:
-----------------------------------
Summary: support outer join elimination
Key: IMPALA-11417
URL: https://issues.apache.org/jira/browse/IMPALA-11417
Project: IMPALA
Issue Type: Improvement
Reporter: Jian Zhang
Assignee: Jian Zhang
We are facing a scenario where two tables are outer joined but only fields from the outer side table are used and the join key of the inner side table is guaranteed to be unique. Take the following simplified query as an example, where s.id is guaranteed to be unique:
{code:sql}
-- drop the test tables if exists:
drop table if exists t;
drop table if exists s;
-- create test tables:
create table t (s_id bigint, value bigint);
create table s(id bigint, value bigint, primary key(id));
-- the test SQL:
select t.* from t left join s on t.s_id = s.id;
{code}
the above query can be optimized to the following if we can utilize the primary key information:
{code:sql}
select t.* from t;
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)