Skip to content

Improve parse_data_type for List, ListView, LargeList, LargeListView, FixedSizeList, Union, Map, RunEndCoded. #8648

@dqkqd

Description

@dqkqd

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

After #8351, we can have better formats for nested data type (with nullability and field name).
I think we should correctly parse those.

For example: #8290 changed List(Int64) to have nullable = false, but parse_list still considers this as nullable = true.

fn parse_list(&mut self) -> ArrowResult<DataType> {
self.expect_token(Token::LParen)?;
let data_type = self.parse_next_type()?;
self.expect_token(Token::RParen)?;
Ok(DataType::List(Arc::new(Field::new_list_field(
data_type, true,
))))
}

Describe the solution you'd like
Correctly parse List, ListView, LargeList, LargeListView, FixedSizeList, Union, Map, RunEndCoded.

Describe alternatives you've considered

Additional context

List can show metadata for its nested Field.
However, since we are not parsing field metadata in Struct, this should be a separated feature?

Metadata

Metadata

Assignees

Labels

arrowChanges to the arrow crateenhancementAny 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