You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2017/10/04 01:28:01 UTC

[jira] [Resolved] (TRAFODION-2736) Missing predicates on salt columns when using an index join

     [ https://issues.apache.org/jira/browse/TRAFODION-2736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Zeller resolved TRAFODION-2736.
------------------------------------
    Resolution: Fixed

Committed into apache/master on 10/3/2017 with https://github.com/apache/incubator-trafodion/pull/1254.

> Missing predicates on salt columns when using an index join
> -----------------------------------------------------------
>
>                 Key: TRAFODION-2736
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2736
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.0-incubating
>         Environment: Any
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>             Fix For: 2.3-incubating
>
>
> When we have salted tables, the compiler is supposed to generate predicates on the salt column automatically, based on predicates on the columns used for salting.
> Suresh and Benny found a case where we don't do that, related to index joins (a join between an index and its base table). Here is an example:
> {code}
> create table tdi(service_id int not null,
>                  user_number int not null,
>                  start_time timestamp not null,
>                  b int,
>                  primary key(service_id, user_number, start_time))
> division by (date_trunc('day', start_time))
> salt using 4 partitions on (user_number);
> create index tdix on tdi(user_number, start_time) salt like table;
> control query shape join(cut,cut);
> prepare s from
> select * from tdi where user_number = 1234 and start_time between timestamp '2017-01-01 00:00:00' and timestamp '2017-01-15 00:00:00';
> explain s;
> {code}
> In the explain, we would expect a predicate on the salt column but there is none.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)