JeongDaeKim commented on code in PR #5323: URL: https://github.com/apache/hive/pull/5323#discussion_r1685831339
########## ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFMkCollectionEvaluator.java: ########## @@ -62,22 +62,16 @@ public ObjectInspector init(Mode m, ObjectInspector[] parameters) super.init(m, parameters); // init output object inspectors // The output of a partial aggregation is a list - if (m == Mode.PARTIAL1) { + if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) { inputOI = parameters[0]; return ObjectInspectorFactory.getStandardListObjectInspector( ObjectInspectorUtils.getStandardObjectInspector(inputOI)); } else { - if (!(parameters[0] instanceof ListObjectInspector)) { - //no map aggregation. - inputOI = ObjectInspectorUtils.getStandardObjectInspector(parameters[0]); - return ObjectInspectorFactory.getStandardListObjectInspector(inputOI); - } else { - internalMergeOI = (ListObjectInspector) parameters[0]; - inputOI = internalMergeOI.getListElementObjectInspector(); - loi = (StandardListObjectInspector) - ObjectInspectorUtils.getStandardObjectInspector(internalMergeOI); - return loi; - } + internalMergeOI = (ListObjectInspector) parameters[0]; Review Comment: @deniskuzZ https://github.com/apache/hive/pull/5323/commits/74e7ce7087682c2a9c23a25b9c1423840baf3b0a Comments updated. (I don't know this comments are necessary though.) -- 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