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

Serhiy Bilousov commented on PHOENIX-1756:
------------------------------------------

IMHO. You can do a lot by math but that why you have functions so user will not 
have to do it over and over. 

I do not have standard handy

DAY() returns day of the month as far as I remember.
all thouse (YEAR(), MONTH(), DAY(), HOUR(), MINUTE(), SECOND(), MILISECOND() 
works of some sort of datetime (date, time, timestamp) format and basically 
returns specific part from that datetime format.

[SQL|https://msdn.microsoft.com/en-us/library/ms186724.aspx] has just YEAR() 
MONTH() DAY() and rest can be obtained by DATEPART

I personally would prefer to have all this covered in EXTRACT to follow 
PostgreSQL/ORACLE so you would have one function to deal with all your datepart 
need so to speak but since we adding Year(), Month(), Second() not to have rest 
feels non intuitive.

> Add Month() and Second() buildin functions
> ------------------------------------------
>
>                 Key: PHOENIX-1756
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1756
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Alicia Ying Shu
>            Assignee: Alicia Ying Shu
>         Attachments: Phoenix-1756.patch
>
>
> From Oracle doc: Month(date) and Second(date). Very similar to Year(date) 
> buildin. 



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

Reply via email to