bkietz commented on code in PR #46303:
URL: https://github.com/apache/arrow/pull/46303#discussion_r2073899428


##########
cpp/src/arrow/compute/kernels/vector_rank.cc:
##########
@@ -381,9 +381,13 @@ class RankMetaFunction : public 
RankMetaFunctionBase<RankMetaFunction> {
   }
 
   RankMetaFunction()
-      : RankMetaFunctionBase("rank", Arity::Unary(), rank_doc, 
&kDefaultOptions) {}
+      : RankMetaFunctionBase("rank", Arity::Unary(), rank_doc, 
GetDefaultOptions()) {}

Review Comment:
   @pitrou well it's not *one* line, but...
   
   ```suggestion
         : RankMetaFunctionBase("rank", Arity::Unary(), rank_doc, [] {
             static const auto kDefaultOptions = RankOptions::Defaults();
             return &kDefaultOptions;
           }()) {}
   ```
   
   An IIFE can introduce a static lifetime object too



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to