phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abe Weinograd <...@flonet.com>
Subject select distinct on a casted value
Date Wed, 30 Jul 2014 18:20:16 GMT
I am testing some queries in Squirrel.  Because we are using unsigned_date,
squirrel isn't terribly happy about that and I frequently am casting those
values to date or timestamp.

When I do SELECT CAST(column1 AS TIMESTAMP), ... FROM table  that seems to
work fine.

If I put a distinct in front of that, I always get NULL.
SELECT DISTINCT CAST(column1 AS TIMESTAMP) FROM table

Removing the distinct and doing a group by on the column also works
properly.
SELECT CAST(column1 AS TIMESTAMP) FROM table GROUP BY column1

I couldn't find a JIRA for this, is it a known issue?  Currently using 3.0
on CDH4.6 (HBase 0.94.15)

Thanks,
Abe

Mime
View raw message