hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohit Sabharwal" <mo...@cloudera.com>
Subject Re: Review Request 32489: HIVE-9518 Implement MONTHS_BETWEEN aligned with Oracle one
Date Thu, 26 Mar 2015 18:14:32 GMT

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



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMonthsBetween.java
<https://reviews.apache.org/r/32489/#comment126260>

    Consider the example where date1 is 1997-02-28 and date2 is 1996-10-30. In this case the
monBtw will be -8, i.e. negative, correct ? But the doc states it should be positive. 
    
    Also, I don't see such a case addressed in the unit tests.
    
    Also, could you explain/add comment about why last day of the month is significant. Shouldn't
we be computing denominator based on getAcutalMaximum of the two dates instead of a fixed
"31" or is that the Oracle behaviour ?


- Mohit Sabharwal


On March 26, 2015, 7:37 a.m., Alexander Pivovarov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32489/
> -----------------------------------------------------------
> 
> (Updated March 26, 2015, 7:37 a.m.)
> 
> 
> Review request for hive and Jason Dere.
> 
> 
> Bugs: HIVE-9518
>     https://issues.apache.org/jira/browse/HIVE-9518
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-9518 Implement MONTHS_BETWEEN aligned with Oracle one
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java 2ba7adf2e6fc8a184c9d1619619dff2f0870528b

>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMonthsBetween.java PRE-CREATION

>   ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFMonthsBetween.java
PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_months_between.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 81abeb9be4fd47724be544c7bc8da8b25fcd6e75

>   ql/src/test/results/clientpositive/udf_months_between.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/32489/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Pivovarov
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message