Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-13025

[C++][Compute] Enhance FunctionOptions with equality, debug representability, and serializability

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0
    • C++

    Description

      Currently the FunctionOptions interface is entirely opaque. It would be useful to add

      • equality comparability
            bool FunctionOptions::Equals(const FunctionOptions& other) const
            
      • debug representation
            std::string FunctionOptions::ToString() const
            
      • serializability
            Status FunctionOptions::Serialize(io::OutputStream*) const
        
            Result<std::unique_ptr<FunctionOptions>>
                FunctionOptions::Deserialize(io::InputStream*)
            

        (or similar)

      These are already implemented for common instances of FunctionOptions in expression.cc, since Expression has the above capabilities and may contain a FunctionOptions. Making these explicit virtual functions will formalize this ad-hoc
      code and expose it for direct unit testing.

      As an added bonus, if options can serialize themselves to JSON then that can be used by Python and other bindings to generate wrappers instead of the current hand-written listing of wrapper classes for each FunctionOptions subclass

      Attachments

        Issue Links

          Activity

            People

              lidavidm David Li
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h
                  6h