scarlin-cloudera commented on code in PR #3800: URL: https://github.com/apache/hive/pull/3800#discussion_r1038800916
########## ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFSum.java: ########## @@ -337,29 +345,35 @@ public GenericUDAFEvaluator getWindowingEvaluator(WindowFrameDef wFrameDef) { return null; } - return new GenericUDAFStreamingEvaluator.SumAvgEnhancer<HiveDecimalWritable, HiveDecimal>( + return new GenericUDAFStreamingEvaluator.SumAvgEnhancer<HiveDecimalWritable, Object[]>( Review Comment: I probably should also add: We can't just put a NULL in the window because of the way the algorithm works. The sum algorithm keeps track of the running sum total within the window that is stored. The sum of the items in the window is the new running sum minus the running total being booted out of the window. So we need an extra data structure to hold the NULL value within the window. -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org