PyRSA commented on code in PR #11033:
URL: https://github.com/apache/paimon/pull/11033#discussion_r4508879258


##########
paimon-python/pypaimon/execution/python/read/reader/aggregate/aggregators.py:
##########
@@ -801,6 +816,11 @@ def __init__(
             )
 
         self.distinct = options.field_collect_distinct(field_name)
+        self.count_limit = options.field_collect_agg_count_limit(field_name)
+        element_base = _atomic_base_name(field_type.element)
+        self._set_dedupe = (
+            self.distinct and element_base in _COLLECT_SET_DEDUPE_TYPES
+        )
 
     def agg_reversed(self, accumulator: Any, input_field: Any) -> Any:

Review Comment:
   Thanks for the review! Fixed the operand order in 
`FieldCollectAgg.agg_reversed()` to match the Java implementation and added 
forward-versus-reversed regression tests covering positive and negative count 
limits in both distinct and non-distinct modes.
   
   All 21 `FieldCollectAggTest` tests pass.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to