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

[C++][Compute] Refactor CheckScalar* to take Datum arguments

    XMLWordPrintableJSON

Details

    Description

      CheckScalar*() are useful functions, but expressing all permutations of input shape in the public signature is overkill. We should consolidate these from

      // Scalar - Scalar
      void CheckScalarBinary(std::string func_name, std::shared_ptr<Scalar> left_input,
                             std::shared_ptr<Scalar> right_input,
                             std::shared_ptr<Scalar> expected,
                             const FunctionOptions* options = nullptr);
      
      // Array - Array
      void CheckScalarBinary(std::string func_name, std::shared_ptr<Array> left_input,
                             std::shared_ptr<Array> right_input,
                             std::shared_ptr<Array> expected,
                             const FunctionOptions* options = nullptr);
      
      // Array-Scalar
      // Scalar-Array
      // ...
      

      to

      void CheckScalarBinary(std::string func_name, Datum left_input,
                             Datum right_input,
                             Datum expected,
                             const FunctionOptions* options = nullptr);
      

      Attachments

        Issue Links

          Activity

            People

              diegodfrf Fernando Rodriguez
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 2h 20m
                  2h 20m