You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Dongkyu Hwangbo (JIRA)" <ji...@apache.org> on 2015/08/28 10:51:45 UTC

[jira] [Updated] (TAJO-1789) 'BETWEEN a AND b' clause has a bug

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

Dongkyu Hwangbo updated TAJO-1789:
----------------------------------
    Description: 
This is TPC-H q6 in TPC-H Reference document.
{code:SQL}
select
sum(l_extendedprice*l_discount) as revenue
from
lineitem
where
l_shipdate >= date '1994-01-01'
and l_shipdate < date '1995-01-01'
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
and l_quantity < 24;
{code}
look this line.
{code:SQL}
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
{code}
this line make a wrong answer.

Replaced line
{code:SQL}
and l_discount between 0.05 and 0.07
{code}
gives me right answer.

Between Answers of 
{code:SQL}
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
{code}
and
{code:SQL}
and l_discount between 0.06 - 0.01 and 0.06
{code}
are same. 
I think "BetweenPredicate" has a bug.

  was:
This is TPC-H q6 in TPC-H Reference document.
{code:SQL}
select
sum(l_extendedprice*l_discount) as revenue
from
lineitem
where
l_shipdate >= date '1994-01-01'
and l_shipdate < date '1995-01-01'
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
and l_quantity < 24;
{code}
look this line.
{code:SQL}
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
{code}
this line make a wrong answer.

Replaced line
{code:SQL}
and l_discount between 0.05 and 0.07
{code}
gives me right answer.


> 'BETWEEN a AND b' clause has a bug
> ----------------------------------
>
>                 Key: TAJO-1789
>                 URL: https://issues.apache.org/jira/browse/TAJO-1789
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Dongkyu Hwangbo
>              Labels: sql
>
> This is TPC-H q6 in TPC-H Reference document.
> {code:SQL}
> select
> sum(l_extendedprice*l_discount) as revenue
> from
> lineitem
> where
> l_shipdate >= date '1994-01-01'
> and l_shipdate < date '1995-01-01'
> and l_discount between 0.06 - 0.01 and 0.06 + 0.01
> and l_quantity < 24;
> {code}
> look this line.
> {code:SQL}
> and l_discount between 0.06 - 0.01 and 0.06 + 0.01
> {code}
> this line make a wrong answer.
> Replaced line
> {code:SQL}
> and l_discount between 0.05 and 0.07
> {code}
> gives me right answer.
> Between Answers of 
> {code:SQL}
> and l_discount between 0.06 - 0.01 and 0.06 + 0.01
> {code}
> and
> {code:SQL}
> and l_discount between 0.06 - 0.01 and 0.06
> {code}
> are same. 
> I think "BetweenPredicate" has a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)