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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to