You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Krystal (JIRA)" <ji...@apache.org> on 2015/04/22 18:01:59 UTC
[jira] [Closed] (DRILL-889) = or <> filter with date against
timestamp column not working as expected
[ https://issues.apache.org/jira/browse/DRILL-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krystal closed DRILL-889.
-------------------------
Close bug as invalid.
> = or <> filter with date against timestamp column not working as expected
> ---------------------------------------------------------------------------
>
> Key: DRILL-889
> URL: https://issues.apache.org/jira/browse/DRILL-889
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Reporter: Krystal
> Assignee: Mehant Baid
> Fix For: 0.4.0
>
>
> git.commit.id.abbrev=8490d74
> git.commit.time=02.06.2014 @ 09\:15\:29 PDT
> The student test table has a create_time column as a timestamp.
> 0: jdbc:drill:schema=dfs> select cast(name as varchar(30)), cast(create_time as timestamp) create_time from student limit 5;
> +------------+-------------+
> | EXPR$0 | create_time |
> +------------+-------------+
> | fred ovid | 2014-05-27T00:26:07.000-07:00 |
> | bob brown | 2014-12-04T21:43:14.000-08:00 |
> | bob hernandez | 2014-05-31T14:33:06.000-07:00 |
> | ulysses xylophone | 2014-06-12T11:27:33.000-07:00 |
> | rachel robinson | 2014-09-01T06:45:57.000-07:00 |
> +------------+-------------+
> Comparing the create_time field using only date portion does not return expected data.
> 0: jdbc:drill:schema=dfs> select cast(name as varchar(30)), cast(create_time as timestamp) create_time from student where create_time = '2014-05-31';
> +------------+-------------+
> | EXPR$0 | create_time |
> +------------+-------------+
> | bob hernandez | 2014-05-31T14:33:06.000-07:00 |
> | priscilla king | 2014-05-31T04:51:54.000-07:00 |
> | yuri nixon | 2014-05-31T00:51:49.000-07:00 |
> +------------+-------------+
> 3 rows selected (0.689 seconds)
> Looks like drill matches only the date portion of the column since the compare value contains only date. In oracle and postgres, the same query returned 0 rows. Looks like these 2 db default time to 0 min/sec/ms before doing comparison.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)