Re: Review Request 71571: HIVE-22240

2019-10-13 Thread Jesús Camacho Rodríguez

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




ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileCont.java
Lines 343 (patched)


New logic is creating new objects for each partial result instead of 
reusing a single object array as it was done before. Any reason for this 
change? It may result in GC spike.



ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileCont.java
Line 385 (original), 371 (patched)


We shoul preallocate the `results` array when we initialize the udf instead 
of creating a new one per call. Convert results can just act on the array based 
on a boolean set at initialization time.


- Jesús Camacho Rodríguez


On Oct. 2, 2019, 7:41 a.m., Krisztian Kasa wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71571/
> ---
> 
> (Updated Oct. 2, 2019, 7:41 a.m.)
> 
> 
> Review request for hive, Jesús Camacho Rodríguez, Zoltan Haindrich, and 
> Vineet Garg.
> 
> 
> Bugs: HIVE-22240
> https://issues.apache.org/jira/browse/HIVE-22240
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> Function percentile_cont fails when array parameter passed
> ==
> The method `GenericUDAFPercentileCont.iterate` expect a `HiveDecimalWritable` 
> parameter. However array parameters are converted to  
> `ArrayList` before they passed. This leads to a 
> `ClassCastException`.
> 
> 
> Diffs
> -
> 
>   
> ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileCont.java
>  e7e4fda6ea 
>   
> ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileDisc.java
>  d7c295cb11 
>   ql/src/test/queries/clientpositive/udaf_percentile_cont.q 7a1ac5c968 
>   ql/src/test/queries/clientpositive/udaf_percentile_disc.q 6d93b3418a 
>   ql/src/test/results/clientpositive/udaf_percentile_cont.q.out a2dae4a06e 
>   ql/src/test/results/clientpositive/udaf_percentile_disc.q.out 3ef0cf9874 
> 
> 
> Diff: https://reviews.apache.org/r/71571/diff/2/
> 
> 
> Testing
> ---
> 
> Existing q tests are extended with calling percentile_cont/disc with array 
> parameters
> 
> 
> Thanks,
> 
> Krisztian Kasa
> 
>



[jira] [Created] (HIVE-22331) unix_timestamp without argument returns timestamp in millisecond instead of second.

2019-10-13 Thread Naresh P R (Jira)
Naresh P R created HIVE-22331:
-

 Summary: unix_timestamp without argument returns timestamp in 
millisecond instead of second.
 Key: HIVE-22331
 URL: https://issues.apache.org/jira/browse/HIVE-22331
 Project: Hive
  Issue Type: Bug
Reporter: Naresh P R
Assignee: Naresh P R


After HIVE-22170, select unix_timestamp(); is returning milliseconds, but 
expected output is in seconds.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)