You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/03/19 14:29:04 UTC

[GitHub] [hive] kasakrisz opened a new pull request #2091: HIVE-24908: Adding Respect/Ignore nulls as a UDAF parameter is ambiguous

kasakrisz opened a new pull request #2091:
URL: https://github.com/apache/hive/pull/2091


   ### What changes were proposed in this pull request?
   1. Add `respectNulls` boolean property to `GenericUDAFParameterInfo`.
   2. Map this property to Windowing specification/definitions objects.
   3. Introduce property to `WindowFunctionDescription` which show whether the function supports handling null treatment settings. 
   * If the `supportNullTreatment` property is not set explicitly the UDAF does not support null treatment and the compiler throws `SemanticException` if specified.
   * If the `supportNullTreatment` property is set to true but the function call does not specify null treatment the default null treatment is used: `RESPECT NULLS`
   * The specified null treatment is used othervise.
   
   ### Why are the changes needed?
   This patch is a follow-up of #2060. See jira for details.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. When calling `lead` or `lag` functions by specifying `RESPECT/IGNORE NULLS`
   * and no default value parameter is given `RESPECT/IGNORE NULLS` are not passed as default value parameter: `NULL` is returned if rows has no corresponding following/preceding rows 
   * and default value parameter is given `RESPECT/IGNORE NULLS` are not passed as default value parameter: no Exception is thrown
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestNegativeLlapLocalCliDriver -Dqfile=nulltreatment.q -pl itests/qtest -Pitests
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=windowing_navfn.q -pl itests/qtest -Pitests
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] kasakrisz merged pull request #2091: HIVE-24908: Adding Respect/Ignore nulls as a UDAF parameter is ambiguous

Posted by GitBox <gi...@apache.org>.
kasakrisz merged pull request #2091:
URL: https://github.com/apache/hive/pull/2091


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org