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

Samarth Jain resolved PHOENIX-3.
--------------------------------

    Resolution: Fixed

SELECT TRUNC(ts, 'day'), TRUNC(ts, 'hour', 1), TRUNC(ts, 'minute', 1), 
TRUNC(ts, 'second', 1), TRUNC(ts, 'millisecond', 1) FROM t1

works fine on 3.0

> TRUNC method doesn't work on column of datatype timestamp
> ---------------------------------------------------------
>
>                 Key: PHOENIX-3
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 2.2.3
>            Reporter: Harshit Bapna
>            Assignee: Samarth Jain
>             Fix For: 3.1, 4.1
>
>
> On executing, select TRUNC(DATELOGGED, 'second', 30) from A, following error 
> is observed :
> Type mismatch. expected: [TIME] but was: TIMESTAMP at TRUNC argument.
> The datatype of DATELOGGED column is timestamp.
> According to the doc at 
> http://phoenix.incubator.apache.org/language/functions.html#/truncate
> It should ideally work on timestamp and date datatypes



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to