You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Namitha Babychan (JIRA)" <ji...@apache.org> on 2012/07/25 12:33:34 UTC

[jira] [Created] (HIVE-3299) UDF DAYNAME(date) to HIVE

Namitha Babychan created HIVE-3299:
--------------------------------------

             Summary: UDF  DAYNAME(date) to HIVE 
                 Key: HIVE-3299
                 URL: https://issues.apache.org/jira/browse/HIVE-3299
             Project: Hive
          Issue Type: New Feature
          Components: UDF
    Affects Versions: 0.9.0
            Reporter: Namitha Babychan
             Fix For: 0.10.0


Function Name: DAYNAME (date)
	 
Returns the name of the weekday for date. 
Example: hive> SELECT DAYNAME('2012-07-25');
                   -> 'Wednesday'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-3299:
---------------------------------

    Status: Open  (was: Patch Available)

@Namitha: A couple comments about the patch:

* The patch causes a test failure in show_functions.q. It looks like the output for this test needs to be updated.
* FunctionRegistry was modified to include UDFRpad twice. This looks like a cut-and-paste error. Please remove.
* The formatting in UDFDayName doesn't adhere to the project guidelines (i.e. indent with two spaces, no TABS, comments on their own lines, etc).
* In the future please submit review requests using either reviewboard (reviews.apache.org) or phabricator. Directions for the latter option are linked off of the HowToContribute wiki page.

Thanks.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Carl Steinbach
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan reassigned HIVE-3299:
--------------------------------------

    Assignee:     (was: Namitha Babychan)
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-3299:
---------------------------------

    Status: Open  (was: Patch Available)

@Namitha: The patch needs to apply cleanly with 'patch -p0 < patch.txt'. Please review the other tips for contributing patches here: https://cwiki.apache.org/confluence/display/Hive/HowToContribute

Also, can you please add a testcase? Thanks.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Status: Patch Available  (was: Open)
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458255#comment-13458255 ] 

Carl Steinbach commented on HIVE-3299:
--------------------------------------

@Aniket: it would be great to get HIVE-2361 committed. At this point someone still needs to take the attached code from 2361 and submit a proper patch with testcases. As for the builtins subproject, at this point we haven't really started using that mechanism for new UDFs, and I'm a little worried that we may have remove some code rust before we can get it to work. If you have time to look into it that would great.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Carl Steinbach
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428970#comment-13428970 ] 

Namitha Babychan commented on HIVE-3299:
----------------------------------------

@Carl Steinbach : I have attached the patch for the issue. Please review and let me know if any modifications has to be made. Thanks.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Aniket Mokashi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458248#comment-13458248 ] 

Aniket Mokashi commented on HIVE-3299:
--------------------------------------

@Carl, are we not considering adding new UDFs to builtin instead? There are several interesting udfs here - https://issues.apache.org/jira/browse/HIVE-2361.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Carl Steinbach
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan reassigned HIVE-3299:
--------------------------------------

    Assignee: Carl Steinbach
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Carl Steinbach
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach reassigned HIVE-3299:
------------------------------------

    Assignee: Namitha Babychan
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "shalish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422899#comment-13422899 ] 

shalish commented on HIVE-3299:
-------------------------------

Hi,

Our team here is working on this UDF and would fix it ASAP.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>             Fix For: 0.10.0
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Attachment: hive-3299.1.patch

patch for the issue hive-3299 is attached. 
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>             Fix For: 0.10.0
>
>         Attachments: hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Attachment: Hive-3299_Testcase.doc

Testcases of the issue Hive-3299 is attached
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Attachment: HIVE-3299.1.patch.txt

The patch for the issue Hive-3299 is attached
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "shalish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

shalish updated HIVE-3299:
--------------------------

    Description: 
Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.


Functionality :-

Function Name: DAYNAME (date)
	 
Returns the name of the weekday for date. 
Example: hive> SELECT DAYNAME('2012-07-25');
                   -> 'Wednesday'

Usage :-

Case 1 : To find DAY NAME corresponding to a particular date 

hive> SELECT DAYNAME('2012-07-25');

                   -> 'Wednesday'



Case 2 : To query a table to find details based on a particular day name
Table :-
date      |item id|store id    |value|unit|price

01/07/2012|110001|0011111111003|0.99|1.00|0.99

02/07/2012|110001|0011111111008|0.99|0.00|0.00

03/07/2012|110001|0011111111009|0.99|0.00|0.00

04/07/2012|110001|0011111112002|0.99|0.00|0.00

05/07/2012|110001|0011111112003|0.99|0.00|0.00

06/07/2012|110001|0011111112006|0.99|1.00|0.99

07/07/2012|110001|0011111112007|0.99|0.00|0.00

08/07/2012|110001|0011111112008|0.99|0.00|0.00

09/07/2012|110001|0011111112009|0.99|0.00|0.00

10/07/2012|110001|0011111112010|0.99|0.00|0.00

11/07/2012|110001|0011111113003|0.99|0.00|0.00

12/07/2012|110001|0011111113006|0.99|0.00|0.00

13/07/2012|110001|0011111113008|0.99|0.00|0.00

14/07/2012|110001|0011111113010|0.99|0.00|0.00

15/07/2012|110001|0011111114002|0.99|0.00|0.00

16/07/2012|110001|0011111114004|0.99|1.00|0.99

17/07/2012|110001|0011111114005|0.99|0.00|0.00

18/07/2012|110001|0011111121004|0.99|0.00|0.00




Query : select * from sales where dayname(date)='wednesday';


Result :-
04/07/2012|110001|0011111112002|0.99|0.00|0.00

11/07/2012|110001|0011111113003|0.99|0.00|0.00

18/07/2012|110001|0011111121004|0.99|0.00|0.00

  was:
Function Name: DAYNAME (date)
	 
Returns the name of the weekday for date. 
Example: hive> SELECT DAYNAME('2012-07-25');
                   -> 'Wednesday'

    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>             Fix For: 0.10.0
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "shalish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422156#comment-13422156 ] 

shalish commented on HIVE-3299:
-------------------------------

Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.


Functionality :-

Function Name: DAYNAME (date)
	 
Returns the name of the weekday for date. 
Example: hive> SELECT DAYNAME('2012-07-25');
                   -> 'Wednesday'

Usage :-

Case 1 : To find DAY NAME corresponding to a particular date 

hive> SELECT DAYNAME('2012-07-25');

                   -> 'Wednesday'



Case 2 : To query a table to find details based on a particular day name
Table :-
date      |item id|store id    |value|unit|price

01/07/2012|110001|0011111111003|0.99|1.00|0.99

02/07/2012|110001|0011111111008|0.99|0.00|0.00

03/07/2012|110001|0011111111009|0.99|0.00|0.00

04/07/2012|110001|0011111112002|0.99|0.00|0.00

05/07/2012|110001|0011111112003|0.99|0.00|0.00

06/07/2012|110001|0011111112006|0.99|1.00|0.99

07/07/2012|110001|0011111112007|0.99|0.00|0.00

08/07/2012|110001|0011111112008|0.99|0.00|0.00

09/07/2012|110001|0011111112009|0.99|0.00|0.00

10/07/2012|110001|0011111112010|0.99|0.00|0.00

11/07/2012|110001|0011111113003|0.99|0.00|0.00

12/07/2012|110001|0011111113006|0.99|0.00|0.00

13/07/2012|110001|0011111113008|0.99|0.00|0.00

14/07/2012|110001|0011111113010|0.99|0.00|0.00

15/07/2012|110001|0011111114002|0.99|0.00|0.00

16/07/2012|110001|0011111114004|0.99|1.00|0.99

17/07/2012|110001|0011111114005|0.99|0.00|0.00

18/07/2012|110001|0011111121004|0.99|0.00|0.00




Query : select * from sales where dayname(date)='wednesday';


Result :-
04/07/2012|110001|0011111112002|0.99|0.00|0.00

11/07/2012|110001|0011111113003|0.99|0.00|0.00

18/07/2012|110001|0011111121004|0.99|0.00|0.00
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>             Fix For: 0.10.0
>
>
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431597#comment-13431597 ] 

Namitha Babychan commented on HIVE-3299:
----------------------------------------

Hi Carl, Thanks alot..Please review and provide your valuable comments.

                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Carl Steinbach
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Bennie Schut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422296#comment-13422296 ] 

Bennie Schut commented on HIVE-3299:
------------------------------------

Currently you can get this trough a unix_timestamp function so if you don't want to wait for an implementation do something like this.
select from_unixtime(unix_timestamp() , 'EEEE') from dummytable limit 1;
or
select from_unixtime(unix_timestamp('2012-07-25 00:00:00'), 'EEEE') from dummytable limit 1;

However simply having a nice udf for it would be nice, like they have in mysql: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_dayname
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>             Fix For: 0.10.0
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Status: Patch Available  (was: Open)

The patch for issue Hive -3299 is attached
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Labels: patch  (was: )
    Status: Patch Available  (was: Open)

patch for the hive-3299 is available in the file hive-3299.1.patch
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Attachment:     (was: hive-3299.1.patch)
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Attachment: udf_dayname.q.out
                udf_dayname.q
                HIVE-3299.1.patch.txt

Thanks for the guidelines.I am attaching the patch and the sample executable test queries and their outputs.
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan reassigned HIVE-3299:
--------------------------------------

    Assignee: Carl Steinbach  (was: Namitha Babychan)
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Carl Steinbach
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Namitha Babychan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Namitha Babychan updated HIVE-3299:
-----------------------------------

    Attachment:     (was: HIVE-3299.1.patch.txt)
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, udf_dayname.q, udf_dayname.q.out
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach reassigned HIVE-3299:
------------------------------------

    Assignee: Namitha Babychan  (was: Carl Steinbach)
    
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>             Fix For: 0.10.0
>
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HIVE-3299) UDF DAYNAME(date) to HIVE

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach updated HIVE-3299:
---------------------------------

    Fix Version/s:     (was: 0.10.0)
           Status: Open  (was: Patch Available)

@Namitha: Thanks for adding the test doc. However, we prefer that each patch include an executable testcase. In this case it's OK to add a qfile testcase. Please take a look at the UDF qfile testcases in ql/src/test/queries/clientpositive/udf_*.q. For this patch you should add a new testcase called udf_dayname.q, and then generate test results for the test by running the following command:

% ant test -Dtestcase=TestCliDriver -Dqfile=udf_dayname.q -Doverwrite=true

More details are available in the HowToContribute document I referenced earlier.

Thanks!
                
> UDF  DAYNAME(date) to HIVE 
> ---------------------------
>
>                 Key: HIVE-3299
>                 URL: https://issues.apache.org/jira/browse/HIVE-3299
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>    Affects Versions: 0.9.0
>            Reporter: Namitha Babychan
>            Assignee: Namitha Babychan
>              Labels: patch
>         Attachments: HIVE-3299.1.patch.txt, Hive-3299_Testcase.doc, hive-3299.1.patch
>
>
> Current releases of Hive lacks a function which would return the day name corresponding to a date / timestamp value which might be a part of a column.   
> The function -DAYNAME (date) would return the day name from a date / timestamp or column which would be useful while using HiveQL. This would find its use  in various business sectors like retail, which would help in  identifying the trends and sales datails for a particular weekday for entire year,month or week.
> Functionality :-
> Function Name: DAYNAME (date)
> 	 
> Returns the name of the weekday for date. 
> Example: hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Usage :-
> Case 1 : To find DAY NAME corresponding to a particular date 
> hive> SELECT DAYNAME('2012-07-25');
>                    -> 'Wednesday'
> Case 2 : To query a table to find details based on a particular day name
> Table :-
> date      |item id|store id    |value|unit|price
> 01/07/2012|110001|0011111111003|0.99|1.00|0.99
> 02/07/2012|110001|0011111111008|0.99|0.00|0.00
> 03/07/2012|110001|0011111111009|0.99|0.00|0.00
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 05/07/2012|110001|0011111112003|0.99|0.00|0.00
> 06/07/2012|110001|0011111112006|0.99|1.00|0.99
> 07/07/2012|110001|0011111112007|0.99|0.00|0.00
> 08/07/2012|110001|0011111112008|0.99|0.00|0.00
> 09/07/2012|110001|0011111112009|0.99|0.00|0.00
> 10/07/2012|110001|0011111112010|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 12/07/2012|110001|0011111113006|0.99|0.00|0.00
> 13/07/2012|110001|0011111113008|0.99|0.00|0.00
> 14/07/2012|110001|0011111113010|0.99|0.00|0.00
> 15/07/2012|110001|0011111114002|0.99|0.00|0.00
> 16/07/2012|110001|0011111114004|0.99|1.00|0.99
> 17/07/2012|110001|0011111114005|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00
> Query : select * from sales where dayname(date)='wednesday';
> Result :-
> 04/07/2012|110001|0011111112002|0.99|0.00|0.00
> 11/07/2012|110001|0011111113003|0.99|0.00|0.00
> 18/07/2012|110001|0011111121004|0.99|0.00|0.00

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira