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

Mala Chikka Kempanna updated IMPALA-6986:
-----------------------------------------
    Description: 
Following two queries run on same dataset should return same output. But they 
are not.

This happens only with parquet data loaded on impala version 2.3.0 and queries 
from Impala 2.11.0 after upgrade
{code:java}
select count(timespan) from metrics where timespan between 
cast(date_add('2018-04-06 14:37:00' , -7) as string) and '2018-04-06 14:37:00';

+-----------------+
| count(timespan) |
+-----------------+
| 1095 |
+-----------------+

select count(timespan) from metrics where timespan between date_add('2018-04-06 
14:37:00' , -7) and '2018-04-06 14:37:00';
{code}
+-----------------+
|count(timespan)|

+-----------------+
|254|

+-----------------+

  was:
Following two queries run on same dataset should return same output. But they 
are not.

{code}

select count(timespan) from metrics where timespan between 
cast(date_add('2018-04-06 14:37:00' , -7) as string) and '2018-04-06 14:37:00';

+-----------------+
| count(timespan) |
+-----------------+
| 1095 |
+-----------------+

select count(timespan) from metrics where timespan between date_add('2018-04-06 
14:37:00' , -7) and '2018-04-06 14:37:00';
{code}
+-----------------+
| count(timespan) |
+-----------------+
| 254 |
+-----------------+


> Inconsistent results for between when date is string vs timestamp
> -----------------------------------------------------------------
>
>                 Key: IMPALA-6986
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6986
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 2.11.0
>            Reporter: Mala Chikka Kempanna
>            Priority: Major
>              Labels: correctness
>
> Following two queries run on same dataset should return same output. But they 
> are not.
> This happens only with parquet data loaded on impala version 2.3.0 and 
> queries from Impala 2.11.0 after upgrade
> {code:java}
> select count(timespan) from metrics where timespan between 
> cast(date_add('2018-04-06 14:37:00' , -7) as string) and '2018-04-06 
> 14:37:00';
> +-----------------+
> | count(timespan) |
> +-----------------+
> | 1095 |
> +-----------------+
> select count(timespan) from metrics where timespan between 
> date_add('2018-04-06 14:37:00' , -7) and '2018-04-06 14:37:00';
> {code}
> +-----------------+
> |count(timespan)|
> +-----------------+
> |254|
> +-----------------+



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to