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


##########
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:
   Do you think it would work to do something like:
   ```c++
   // in .h file
   template <typename OptionsType>
   const FunctionOptions* StaticOptionsInit() {
     static const auto kDefaultOptions = OptionsType::Defaults();
     return &kDefaultOptions;
   };
   
   // in .cc file
   class RankMetaFunction : public RankMetaFunctionBase<RankMetaFunction> {
    public:
     RankMetaFunction()
         : RankMetaFunctionBase("rank", Arity::Unary(), rank_doc, 
StaticOptionsInit<RankOptions>()) {}
   ```



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