Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CC9B173D2 for ; Sun, 8 Mar 2015 00:57:00 +0000 (UTC) Received: (qmail 33453 invoked by uid 500); 8 Mar 2015 00:57:00 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 33395 invoked by uid 500); 8 Mar 2015 00:57:00 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 33384 invoked by uid 99); 8 Mar 2015 00:57:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2015 00:57:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 08 Mar 2015 00:56:59 +0000 Received: (qmail 33042 invoked by uid 99); 8 Mar 2015 00:56:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2015 00:56:38 +0000 Date: Sun, 8 Mar 2015 00:56:38 +0000 (UTC) From: "Alicia Ying Shu (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-1704) Add year() built-in function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351852#comment-14351852 ] Alicia Ying Shu commented on PHOENIX-1704: ------------------------------------------ [~jamestaylor] Our customer want it. Month() and Second() are also in the top of the list. The use case is like Year(now()). Year() returns an integer not time so needs its own treat as a scalar function. Thus Year(epoch) is not really needed. We want this buildin function to be in soon. Thanks. > 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)