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

[C++] Add convenience function to substrait consumer to create plan instead of declaration

    XMLWordPrintableJSON

Details

    Description

      This is a follow-up to ARROW-15238

      The current API for Substrait is:

      Result<std::vector<compute::Declaration>> DeserializePlan(
          const Buffer&, const ConsumerFactory&, ExtensionSet* ext_set = NULLPTR)
      

      This converts a plan into a vector of declarations (one per root-relation in the Substrait plan)
      These declarations then have to be added to an exec plan to run.

      As a convenience we could alter the API:

      Result<std::vector<compute::Declaration>> DeserializePlans(
          const Buffer&, const ConsumerFactory&, ExtensionSet* ext_set = NULLPTR)
      result<compute::ExecPlan> DeserializePlan(const Buffer&, const ConsumerFactory&, ExtensionSet* ext_set = NULLPTR)
      

      This would save the user from needing to create an empty exec plan (and it could return an error if the substrait plan had multiple root relations).

      Attachments

        Issue Links

          Activity

            People

              sanjibansg Sanjiban Sengupta
              westonpace Weston Pace
              Votes:
              0 Vote for this issue
              Watchers:
              2 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
                  2h