impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Armstrong <tarmstr...@cloudera.com>
Subject Re: Investigation of IMPALA-3678
Date Wed, 15 Jun 2016 20:11:52 GMT
Dimitris and Alex are the local experts on that code, so maybe they will
have a better idea of what the correct solution is.

On Wed, Jun 15, 2016 at 2:33 AM, Feng, Guangyuan <guangyuan.feng@intel.com>
wrote:

> Hi,
>
> I'm investigating the issue of IMPALA-3678, and wanted to work on it. Some
> findings as follow:
>
> [TEST SQL]:
> select xx.o_orderkey from (
> (select o_orderkey from orders x order by o_orderkey desc limit 15)
> union
> (select o_orderkey from tpch_parquet.orders_pq x order by o_orderkey desc
> limit 15)) xx
> left join lineitem l
> on xx.o_orderkey = l.l_orderkey where xx.o_orderkey > 0
>
> This bug appears in the phrase of creating the plan tree. More precisely,
> while creating UNION node,
> the predicate(xx.o_orderkey > 0), owned by LEFT JOIN clause, will be
> propagated to UNION clause,
> at the same time, a cloned predicate will be added into the global
> conjuncts. Then, on line SortNode.java:92,
> assignConjuncts(analyzer) could match the new predicate and add it to
> conjuncts_, obviously, the next statement
> Preconditions.checkState(conjuncts_.isEmpty()) fails.
>
> My rough idea to fix it is, add LEFT JOIN predicates into
> globalState_.ojClauseByConjunct, or do some other tricks in
> assignConjuncts(analyzer).
>
> Would anyone help clarify if it's not going in the right way?
> Thanks.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message