Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # dev >> Review Request 15213: HIVE-5731: Use new GenericUDF instead of basic UDF for UDFDate* classes


+
Mohammad Islam 2013-11-04, 21:25
+
Mohammad Islam 2013-11-05, 19:33
Copy link to this message
-
Re: Review Request 15213: HIVE-5731: Use new GenericUDF instead of basic UDF for UDFDate* classes

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

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java
<https://reviews.apache.org/r/15213/#comment55521>

    Shouldn't the outputOI be writableDateOI ?

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java
<https://reviews.apache.org/r/15213/#comment55518>

    First argument should be argumentOI.

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java
<https://reviews.apache.org/r/15213/#comment55519>

    First argument should be argumentOI.

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java
<https://reviews.apache.org/r/15213/#comment55520>

    Instead of throwing up in parse exception, we should return null in such cases.

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateAdd.java
<https://reviews.apache.org/r/15213/#comment55522>

    outputOI should be writableDateOI

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateAdd.java
<https://reviews.apache.org/r/15213/#comment55523>

    First arg should be ((PrimitiveObjectInspector) arguments[0])

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateAdd.java
<https://reviews.apache.org/r/15213/#comment55524>

    Instead of throwing exception, this should return null.

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java
<https://reviews.apache.org/r/15213/#comment55528>

    In evaluate() you are creating new IntWritable everytime, instead that function should return int and you should do output.set() and return output. This way we will save unnecessary object creation of intWritable for each invocation.

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateSub.java
<https://reviews.apache.org/r/15213/#comment55525>

    outputOI should be writableOI

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateSub.java
<https://reviews.apache.org/r/15213/#comment55526>

    first argument should be ((PrimitiveObjectInspector) arguments[0])

ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateSub.java
<https://reviews.apache.org/r/15213/#comment55527>

    this should return null, instead of throwing exception.
- Ashutosh Chauhan
On Nov. 5, 2013, 7:33 p.m., Mohammad Islam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15213/
> -----------------------------------------------------------
>
> (Updated Nov. 5, 2013, 7:33 p.m.)
>
>
> Review request for hive.
>
>
> Bugs: HIVE-5731
>     https://issues.apache.org/jira/browse/HIVE-5731
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> GenericUDF class is the latest and recommended base class for any UDFs.
> This JIRA is to change the current UDFDate* classes extended from GenericUDF.
>
>
> Diffs
> -----
>
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 8d3a84f
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDate.java 3df453c
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateAdd.java b1b0bf2
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateDiff.java da14c4f
>   ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDateSub.java c8a1d1f
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDate.java PRE-CREATION
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateAdd.java PRE-CREATION
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateDiff.java PRE-CREATION
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateSub.java PRE-CREATION
>   ql/src/test/org/apache/hadoop/hive/ql/udf/TestGenericUDFDate.java PRE-CREATION
>   ql/src/test/org/apache/hadoop/hive/ql/udf/TestGenericUDFDateAdd.java PRE-CREATION
>   ql/src/test/org/apache/hadoop/hive/ql/udf/TestGenericUDFDateDiff.java PRE-CREATION
+
Mohammad Islam 2013-11-11, 21:06
+
Mohammad Islam 2013-11-11, 21:03
+
Ashutosh Chauhan 2013-11-25, 23:13