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

[C++] FieldRef::FindAll/FindOne(DataType) improve error

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 11.0.0
    • C++
    • None

    Description

      GitHub PR 14495 adds support for struct_field to accept string field names (as well as a mix of indices/strings). A side effect is the error produced by FieldRef::FindOne and by proxy FieldRef::FindAll does not give as good of an error as the previous StructFieldFunctor::CheckIndex did.

      See the GitHub discussion here for more context

      It would be good to have a similar error message given when using FieldRef::FineOne on a DataType.

      Example error from StructFieldFunctor::CheckIndex:
      out-of-bounds field reference to field 4 in type struct<a: int32, b: string, c: struct<d: int64, e: double>> with 3 fields

      Error from FieldRef::FindOne:
      No match for FieldRef.FieldPath(2 4) in struct<a: int32, b: string, c: struct<d: int64, e: double>>

      Attachments

        Issue Links

          Activity

            People

              milesgranger Miles Granger
              milesgranger Miles Granger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: