Skip to content

Unify Field's Display #8775

@dqkqd

Description

@dqkqd

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

There are two different representations for Field:

  1. In Struct, Map, Union, RunEndEncoded, for example: "value": nullable Int32
  2. In List-like, for example: nullable Int32, field: 'value'

Describe the solution you'd like

We should use one Display for Field.

Describe alternatives you've considered

None.

Additional context

We already had fn format_field (this is used in Struct, etc.) :

format!("{name:?}: {maybe_nullable}{data_type}{metadata_str}")

We can replace List-like display using the above format_field:

write!(
f,
"FixedSizeList({size} x {maybe_nullable}{data_type}{field_name_str}{metadata_str})",
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions