Skip to content

ArrowSchemaVisitor should pass FieldRef instead of &Field #2310

@mbutrovich

Description

@mbutrovich

ArrowSchemaVisitor's lifecycle methods (before_field, after_field, before_list_element, etc.) currently take &Field. Because the underlying data in Fields is stored as Arc<Field> (FieldRef), callers that need to retain field info across the traversal are forced to clone the entire Field (including its name string, metadata hashmap, and child types).

Changing the signatures to accept &FieldRef would let visitors store a cheap Arc::clone instead.

See: #2301 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions