hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Zhang <jiezh2...@gmail.com>
Subject Equal predicate on timestamp column
Date Sat, 13 Jun 2015 01:18:53 GMT
Hi,

I have a table partitioned on every hour, the partitioning column ds is
timestamp type. However, I could not locate one partition with the equal
predicate on ds, only the range predicates works. Here are the ddl and
queries:

create table test (c1 int, c2 string) partitioned by (ds timestamp) stored
as orc;

// this query with range predicates returns records from the 15:00:00 hour
partition

select ds from test where ds between '2015-06-11 15:00:00' and '2015-06-11
15:00:01';

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

|           ds           |

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

| 2015-06-11 15:00:00.0  |

| 2015-06-11 15:00:00.0  |

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

// all the following queries with equal predicate does not return any record

select ds from test where ds = '2015-06-11 15:00:00';

select ds from test where ds = '2015-06-11 15:00:00.0';

select ds from test where ds = '2015-06-11 15:00:00.000000000';

+-----+--+

| ds  |

+-----+--+

Does anyone know why the equal predicate on timestamp col can not find the
match as expected while range predicate works fine? Thanks very much for
the help!

Jessica

Mime
View raw message