lidavidm commented on a change in pull request #10511:
URL: https://github.com/apache/arrow/pull/10511#discussion_r660099591



##########
File path: cpp/src/arrow/compute/function.h
##########
@@ -39,12 +40,49 @@ namespace compute {
 ///
 /// @{
 
+/// \brief Extension point for defining options outside libarrow (but
+/// still within this project).
+class ARROW_EXPORT FunctionOptionsType {
+ public:
+  virtual ~FunctionOptionsType() = default;
+
+  virtual const char* type_name() const = 0;
+  virtual std::string Stringify(const FunctionOptions&) const = 0;
+  virtual bool Compare(const FunctionOptions&, const FunctionOptions&) const = 
0;
+  /// \brief Convert this options struct into a Struct scalar.
+  virtual Status ToStructScalar(const FunctionOptions&,
+                                std::vector<std::string>* field_names,
+                                std::vector<std::shared_ptr<Scalar>>* values) 
const;

Review comment:
       Ah, sorry, I misunderstood before. This raises a question though: to 
know the type_name to deserialize, we need to make some assumption about the 
serialized data. (Or, as before, we need to register a mapping between function 
and options type.)




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