[jira] [Updated] (HIVE-24908) Adding Respect/Ignore nulls as a UDAF parameter is ambiguous

2021-03-23 Thread Jesus Camacho Rodriguez (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesus Camacho Rodriguez updated HIVE-24908:
---
Fix Version/s: 4.0.0

> Adding Respect/Ignore nulls as a UDAF parameter is ambiguous
> 
>
> Key: HIVE-24908
> URL: https://issues.apache.org/jira/browse/HIVE-24908
> Project: Hive
>  Issue Type: Bug
>  Components: UDF
>Reporter: Krisztian Kasa
>Assignee: Krisztian Kasa
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Both function calls translated to the same UDAF call:
> {code}
> SELECT lead(a, 2, true) ...
> SELECT lead(a, 2) IGNORE NULLS ...
> {code}
> IGNORE NULLS is passed as an extra constant boolean parameter to the UDAF
> https://github.com/apache/hive/blob/eed78dfdcb6dfc2de400397a60de12e6f62b96e2/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java#L743
> However the semantics of the two function calls has different semantics:
> * *lead(a, 2, true)* - 'true' is the default value: "The value of DEFAULT is 
> returned as the result if there is no row corresponding to the OFFSET number 
> of rows before R within P (for the lag function) or after R within P (for the 
> lead function)"
> * *lead(a, 2) IGNORE NULLS* - For each row in the current window find the 2nd 
> not-NULL value starting directly after the current row. 



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


[jira] [Updated] (HIVE-24908) Adding Respect/Ignore nulls as a UDAF parameter is ambiguous

2021-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HIVE-24908:
--
Labels: pull-request-available  (was: )

> Adding Respect/Ignore nulls as a UDAF parameter is ambiguous
> 
>
> Key: HIVE-24908
> URL: https://issues.apache.org/jira/browse/HIVE-24908
> Project: Hive
>  Issue Type: Bug
>  Components: UDF
>Reporter: Krisztian Kasa
>Assignee: Krisztian Kasa
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Both function calls translated to the same UDAF call:
> {code}
> SELECT lead(a, 2, true) ...
> SELECT lead(a, 2) IGNORE NULLS ...
> {code}
> IGNORE NULLS is passed as an extra constant boolean parameter to the UDAF
> https://github.com/apache/hive/blob/eed78dfdcb6dfc2de400397a60de12e6f62b96e2/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java#L743
> However the semantics of the two function calls has different semantics:
> * *lead(a, 2, true)* - 'true' is the default value: "The value of DEFAULT is 
> returned as the result if there is no row corresponding to the OFFSET number 
> of rows before R within P (for the lag function) or after R within P (for the 
> lead function)"
> * *lead(a, 2) IGNORE NULLS* - For each row in the current window find the 2nd 
> not-NULL value starting directly after the current row. 



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