alamb commented on code in PR #8765:
URL: https://github.com/apache/arrow-rs/pull/8765#discussion_r2486607302
##########
arrow-schema/src/datatype_parse.rs:
##########
@@ -88,80 +88,88 @@ impl<'a> Parser<'a> {
Token::LargeListView => self.parse_large_list_view(),
Token::FixedSizeList => self.parse_fixed_size_list(),
Token::Struct => self.parse_struct(),
+ Token::Union => self.parse_union(),
+ Token::Map => self.parse_map(),
+ Token::RunEndEncoded => self.parse_run_end_encoded(),
tok => Err(make_error(
self.val,
&format!("finding next type, got unexpected '{tok}'"),
)),
}
}
- /// Parses list field name. Returns default field name if not found.
- fn parse_list_field_name(&mut self, context: &str) -> ArrowResult<String> {
- // field must be after a comma
- if self
+ /// parses Field, this is the inversion of `format_field` in
`datatype_display.rs`.
+ /// E.g: "a": nullable Int64
+ ///
+ /// TODO: support metadata: `"a": nullable Int64 metadata: {"foo":
"value"}`
+ fn parse_field(&mut self) -> ArrowResult<Field> {
Review Comment:
Maybe we can file a follow on ticket to unify them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]