Skip to content

Conversation

dqkqd
Copy link

@dqkqd dqkqd commented Oct 18, 2025

Which issue does this PR close?

Rationale for this change

The format for DataType::List includes:

  • List(Int64): list not nullable.
  • List(nullable Int64): list nullable.
  • List(nullable Int64, field: 'foo'): list nullable with field.
    List(nullable Int64, metadata: {"foo1": "value1"}): list with metadata.

(... The list goes on for ListView, LargeList, LargeListView, FixedSizeList)

parse_data_type cannot (or incorrectly) work on those data types listed above.

What changes are included in this PR?

  • Add Token::... to support new Display format for list types introduced in Improve Display for DataType #8351
    (e.g. FixedSizeList(5 x nullable Int64, field: 'foo').
  • Add fn nullable to check whether nested data type is nullable.
  • Add parse_single_quoted_string and parse_list_field_name to handle field: 'foo'.

Are these changes tested?

Yes. Added round trip tests.

Are there any user-facing changes?

Yes. This is related to #8351

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 18, 2025
@dqkqd dqkqd marked this pull request as draft October 18, 2025 07:13
@dqkqd dqkqd marked this pull request as ready for review October 18, 2025 07:29
@dqkqd dqkqd force-pushed the support-parse-list branch from 5826fb5 to e25e4a1 Compare October 18, 2025 07:37
@dqkqd dqkqd marked this pull request as draft October 18, 2025 09:59
@dqkqd dqkqd changed the title feat: consider nullability and field for DataType::List feat: parse List, ListView, LargeList, LargeListView, FixedSizeList Oct 18, 2025

"nullable" => Token::Nullable,
"field" => Token::Field,
"x" => Token::X,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find a better name for x.
Using Time seems confuse with time related data types.

@dqkqd dqkqd marked this pull request as ready for review October 18, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant