[ 
https://issues.apache.org/jira/browse/PHOENIX-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351291#comment-14351291
 ] 

Serhiy Bilousov edited comment on PHOENIX-1704 at 3/7/15 1:37 AM:
------------------------------------------------------------------

If I say something silly please ignore :)
Would YEAR() be covered under 
https://issues.apache.org/jira/browse/PHOENIX-1662 for EXTRACT ? see: 
http://www.postgresql.org/docs/9.4/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

I also notice that all tests and conversion from string. Is it ok that there is 
no tests from actual column from a view or table to catch any kind of issues 
may arose on round trip? Would it be useful to be able to work with epoch 
YEAR(epoch) YEAR(timestamp) etc ... (this applies to already implemented 
data/time functions too)? also NULLs and "" (empty strings) ...


was (Author: sergey.b):
If I say something silly please ignore :)
Would YEAR() be covered under 
https://issues.apache.org/jira/browse/PHOENIX-1662 for EXTRACT ? see: 
http://www.postgresql.org/docs/9.4/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT

I also notice that all tests and conversion from string. Is it ok that there is 
no tests from actual column from a view or table to catch any kind of issues 
may arose on round trip? Would it be useful to be able to work with epoch 
YEAR(epoch) YEAR(timestamp) etc ... (this applies to already implemented 
data/time functions too)?

> Add year() built-in function
> ----------------------------
>
>                 Key: PHOENIX-1704
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1704
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>         Attachments: Phoenix-1704-v1.patch, Phoenix-1704.patch
>
>
> SELECT YEAR('2014-12-13 10:13:18', 'yyyy-MM-dd hh:mm:ss') FROM YEARFUNC  --> 
> 2014
> SELECT YEAR('2014-12-13') FROM YEARFUNC  --> 2014
> SELECT YEAR('Sat, 3 Feb 2014 03:05:06 GMT', 'EEE, d MMM yyyy HH:mm:ss z', 
> 'UTC') FROM YEARFUNC  --> 2014



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to