You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2022/11/09 12:51:00 UTC

[jira] [Updated] (ARROW-18295) [C++] FieldRef::FindAll/FindOne(DataType) improve error

     [ https://issues.apache.org/jira/browse/ARROW-18295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joris Van den Bossche updated ARROW-18295:
------------------------------------------
    Summary: [C++] FieldRef::FindAll/FindOne(DataType) improve error  (was: [C++] FieldRef::FineAll/FindOne(DataType) improve error)

> [C++] FieldRef::FindAll/FindOne(DataType) improve error
> -------------------------------------------------------
>
>                 Key: ARROW-18295
>                 URL: https://issues.apache.org/jira/browse/ARROW-18295
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Miles Granger
>            Assignee: Miles Granger
>            Priority: Major
>             Fix For: 11.0.0
>
>
> [GitHub PR 14495 | https://github.com/apache/arrow/pull/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 | https://github.com/apache/arrow/pull/14495#discussion_r1016325430]
> 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>>_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)