pitrou commented on code in PR #41352:
URL: https://github.com/apache/arrow/pull/41352#discussion_r1599952375


##########
cpp/src/arrow/compute/row/grouper.cc:
##########
@@ -223,12 +223,11 @@ struct AnyKeysSegmenter : public BaseRowSegmenter {
 
   AnyKeysSegmenter(const std::vector<TypeHolder>& key_types, ExecContext* ctx)
       : BaseRowSegmenter(key_types),
-        ctx_(ctx),
-        grouper_(nullptr),
+        grouper_(Grouper::Make(key_types, ctx).ValueOrDie()),

Review Comment:
   But isn't it pointless to construct the `Grouper` twice? Can't the 
constructor simply take the `Grouper` that was constructed in the factory 
method?



-- 
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