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

[C++] Enable struct_field kernel to accept string field names

    XMLWordPrintableJSON

Details

    Description

      Currently the "struct_field" kernel only works for integer indices for the child fields. From the StructFieldOption class (https://github.com/apache/arrow/blob/3d7f2f22a0fc441a41b8fa971e11c0f4290ebb24/cpp/src/arrow/compute/api_scalar.h#L283-L285):

        /// The child indices to extract. For instance, to get the 2nd child
        /// of the 1st child of a struct or union, this would be {0, 1}.
        std::vector<int> indices;
      

      It would be nice if you could also refer to fields by name in addition to by position.

      Attachments

        Issue Links

          Activity

            People

              milesgranger Miles Granger
              jorisvandenbossche Joris Van den Bossche
              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 - 11h 40m
                  11h 40m