You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Alexander Pivovarov <ap...@gmail.com> on 2015/04/01 19:56:55 UTC

Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/
-----------------------------------------------------------

Review request for hive and Jason Dere.


Bugs: HIVE-3378
    https://issues.apache.org/jira/browse/HIVE-3378


Repository: hive-git


Description
-------

HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 2476e832b8b7101971ea2226368aa82633b7e7d1 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
  ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
  ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
  ql/src/test/results/clientpositive/show_functions.q.out 22091d06241218a5c0ee21d6ee6be00a71706971 
  ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/32732/diff/


Testing
-------


Thanks,

Alexander Pivovarov


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Alexander Pivovarov <ap...@gmail.com>.

> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 46
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line46>
> >
> >     I have usually seen GenericUDFS been used in cases where we need to use complex types. Little confused on why can't we get by here with a regular UDF and have an implementation similar to the dayofmonth UDF?
> >     
> >     Or is there something that I am missing?
> >     
> >     [1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java

The function supports date/timestamp/string as an input type. GenericUDF provides getDateValue method to get Date. It also validates is input is simple type and belong to STRING or DATE group.


> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 49
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line49>
> >
> >     Move inside the evaluate method.

The code repeats common code blocks from other recently added UDFs, e.g. GenericUDFAddMonths


> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java, line 109
> > <https://reviews.apache.org/r/32732/diff/1/?file=912254#file912254line109>
> >
> >     Why is this test commented out?

because of HIVE-10178 committed to trunk 2 days ago. I'll add the test back


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/#review79569
-----------------------------------------------------------


On April 1, 2015, 5:56 p.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32732/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 5:56 p.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-3378
>     https://issues.apache.org/jira/browse/HIVE-3378
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 2476e832b8b7101971ea2226368aa82633b7e7d1 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 22091d06241218a5c0ee21d6ee6be00a71706971 
>   ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32732/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Swarnim Kulkarni <ku...@gmail.com>.

> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 49
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line49>
> >
> >     Move inside the evaluate method.
> 
> Alexander Pivovarov wrote:
>     The code repeats common code blocks from other recently added UDFs, e.g. GenericUDFAddMonths

IMO it's always better to keep variables as local as possible and in this case since they are not used anywhere else outside of this method, I think they should be instantiated and moved inside the method.


> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 50
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line50>
> >
> >     Does this need to be a global variable? Can't you move this inside the evaluate method itself?
> 
> Alexander Pivovarov wrote:
>     The code repeats common code blocks from other recently added UDFs, e.g. GenericUDFAddMonths
>     private final Text output = new Text();

Same comment here as above?


> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 46
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line46>
> >
> >     I have usually seen GenericUDFS been used in cases where we need to use complex types. Little confused on why can't we get by here with a regular UDF and have an implementation similar to the dayofmonth UDF?
> >     
> >     Or is there something that I am missing?
> >     
> >     [1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java
> 
> Alexander Pivovarov wrote:
>     The function supports date/timestamp/string as an input type. GenericUDF provides getDateValue method to get Date. It also validates is input is simple type and belong to STRING or DATE group.
> 
> Alexander Pivovarov wrote:
>     Look at the following output of day and dayofyear functions.
>     
>     hive> select day(100);
>     OK
>     NULL
>     
>     hive> select dayofyear(100);
>     FAILED: SemanticException [Error 10016]: Line 1:17 Argument type mismatch '100': dayofyear only takes STRING_GROUP, DATE_GROUP types as 1st argument, got INT
>     
>     
>     As you can see GenericUDF validation method prints detailed error message to the user why 100 is not valid argument.
>     I guess we should refactor "day" function to extend GenericUDF as well.

The null returned by day(or dayofmonth) is because of the line here[1] where we catch a parseexception and return a null, and not because we are extending a UDF instead of a GenericUDF. So I am all up for changing that to handle the parseexception better.

[1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java#L71


- Swarnim


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/#review79569
-----------------------------------------------------------


On April 9, 2015, 10:08 p.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32732/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 10:08 p.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-3378
>     https://issues.apache.org/jira/browse/HIVE-3378
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 8e1b98bd23a2474af903383c27ea970906bc55d1 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out cb54c6f7e66bdf707029048cde34a250dd4a86b1 
>   ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32732/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Alexander Pivovarov <ap...@gmail.com>.

> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 50
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line50>
> >
> >     Does this need to be a global variable? Can't you move this inside the evaluate method itself?

The code repeats common code blocks from other recently added UDFs, e.g. GenericUDFAddMonths
private final Text output = new Text();


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/#review79569
-----------------------------------------------------------


On April 1, 2015, 5:56 p.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32732/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 5:56 p.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-3378
>     https://issues.apache.org/jira/browse/HIVE-3378
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 2476e832b8b7101971ea2226368aa82633b7e7d1 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 22091d06241218a5c0ee21d6ee6be00a71706971 
>   ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32732/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Alexander Pivovarov <ap...@gmail.com>.

> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 46
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line46>
> >
> >     I have usually seen GenericUDFS been used in cases where we need to use complex types. Little confused on why can't we get by here with a regular UDF and have an implementation similar to the dayofmonth UDF?
> >     
> >     Or is there something that I am missing?
> >     
> >     [1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java
> 
> Alexander Pivovarov wrote:
>     The function supports date/timestamp/string as an input type. GenericUDF provides getDateValue method to get Date. It also validates is input is simple type and belong to STRING or DATE group.

Look at the following output of day and dayofyear functions.

hive> select day(100);
OK
NULL

hive> select dayofyear(100);
FAILED: SemanticException [Error 10016]: Line 1:17 Argument type mismatch '100': dayofyear only takes STRING_GROUP, DATE_GROUP types as 1st argument, got INT


As you can see GenericUDF validation method prints detailed error message to the user why 100 is not valid argument.
I guess we should refactor "day" function to extend GenericUDF as well.


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/#review79569
-----------------------------------------------------------


On April 1, 2015, 5:56 p.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32732/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 5:56 p.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-3378
>     https://issues.apache.org/jira/browse/HIVE-3378
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 2476e832b8b7101971ea2226368aa82633b7e7d1 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 22091d06241218a5c0ee21d6ee6be00a71706971 
>   ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32732/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Alexander Pivovarov <ap...@gmail.com>.

> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 46
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line46>
> >
> >     I have usually seen GenericUDFS been used in cases where we need to use complex types. Little confused on why can't we get by here with a regular UDF and have an implementation similar to the dayofmonth UDF?
> >     
> >     Or is there something that I am missing?
> >     
> >     [1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java
> 
> Alexander Pivovarov wrote:
>     The function supports date/timestamp/string as an input type. GenericUDF provides getDateValue method to get Date. It also validates is input is simple type and belong to STRING or DATE group.
> 
> Alexander Pivovarov wrote:
>     Look at the following output of day and dayofyear functions.
>     
>     hive> select day(100);
>     OK
>     NULL
>     
>     hive> select dayofyear(100);
>     FAILED: SemanticException [Error 10016]: Line 1:17 Argument type mismatch '100': dayofyear only takes STRING_GROUP, DATE_GROUP types as 1st argument, got INT
>     
>     
>     As you can see GenericUDF validation method prints detailed error message to the user why 100 is not valid argument.
>     I guess we should refactor "day" function to extend GenericUDF as well.
> 
> Swarnim Kulkarni wrote:
>     The null returned by day(or dayofmonth) is because of the line here[1] where we catch a parseexception and return a null, and not because we are extending a UDF instead of a GenericUDF. So I am all up for changing that to handle the parseexception better.
>     
>     [1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java#L71

In case of using GenericUDF the check happens in initialize method (not in evaluate).
Also, GenericUDF provides methods to get Constant values.  (just giving you the overview of GenericUDF)
I recommend you to look at https://issues.apache.org/jira/browse/HIVE-9744 Move common arguments validation and value extraction code to GenericUDF
My understanding is that all new UDFs should extend GenericUDF.
You can look at recently added UDFs: GenericUDFInitCap, GenericUDFAddMonth, GenericUDFLastDay, GenericUDFNextDay, GenericUDFMonthsBetween


> On April 9, 2015, 8:34 p.m., Swarnim Kulkarni wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java, line 49
> > <https://reviews.apache.org/r/32732/diff/1/?file=912253#file912253line49>
> >
> >     Move inside the evaluate method.
> 
> Alexander Pivovarov wrote:
>     The code repeats common code blocks from other recently added UDFs, e.g. GenericUDFAddMonths
> 
> Swarnim Kulkarni wrote:
>     IMO it's always better to keep variables as local as possible and in this case since they are not used anywhere else outside of this method, I think they should be instantiated and moved inside the method.

The reason for having field Calendar in UDF class is because calendar can be created once and used for all rows processing.
If I move it to evaluate method then I need to call Calendar.getInstance() on every row (which will be less efficient)


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/#review79569
-----------------------------------------------------------


On April 9, 2015, 10:08 p.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32732/
> -----------------------------------------------------------
> 
> (Updated April 9, 2015, 10:08 p.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-3378
>     https://issues.apache.org/jira/browse/HIVE-3378
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 8e1b98bd23a2474af903383c27ea970906bc55d1 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out cb54c6f7e66bdf707029048cde34a250dd4a86b1 
>   ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32732/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Swarnim Kulkarni <ku...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/#review79569
-----------------------------------------------------------



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java
<https://reviews.apache.org/r/32732/#comment129023>

    I have usually seen GenericUDFS been used in cases where we need to use complex types. Little confused on why can't we get by here with a regular UDF and have an implementation similar to the dayofmonth UDF?
    
    Or is there something that I am missing?
    
    [1] https://github.com/cloudera/hive/blob/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java
<https://reviews.apache.org/r/32732/#comment129026>

    Move inside the evaluate method.



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java
<https://reviews.apache.org/r/32732/#comment129025>

    Does this need to be a global variable? Can't you move this inside the evaluate method itself?



ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java
<https://reviews.apache.org/r/32732/#comment129027>

    Why is this test commented out?


- Swarnim Kulkarni


On April 1, 2015, 5:56 p.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32732/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 5:56 p.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-3378
>     https://issues.apache.org/jira/browse/HIVE-3378
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 2476e832b8b7101971ea2226368aa82633b7e7d1 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 22091d06241218a5c0ee21d6ee6be00a71706971 
>   ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32732/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Re: Review Request 32732: HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE

Posted by Alexander Pivovarov <ap...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32732/
-----------------------------------------------------------

(Updated April 9, 2015, 10:08 p.m.)


Review request for hive and Jason Dere.


Changes
-------

added tests for negative unix time back


Bugs: HIVE-3378
    https://issues.apache.org/jira/browse/HIVE-3378


Repository: hive-git


Description
-------

HIVE-3378 UDF to obtain the numeric day of an year from date or timestamp in HIVE


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 8e1b98bd23a2474af903383c27ea970906bc55d1 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDayOfYear.java PRE-CREATION 
  ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDayOfYear.java PRE-CREATION 
  ql/src/test/queries/clientpositive/udf_dayofyear.q PRE-CREATION 
  ql/src/test/results/clientpositive/show_functions.q.out cb54c6f7e66bdf707029048cde34a250dd4a86b1 
  ql/src/test/results/clientpositive/udf_dayofyear.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/32732/diff/


Testing
-------


Thanks,

Alexander Pivovarov