Jefffrey commented on code in PR #12254:
URL: https://github.com/apache/arrow-rs/pull/12254#discussion_r4627153011
##########
arrow-schema/src/datatype_parse.rs:
##########
@@ -103,10 +103,15 @@ impl<'a> Parser<'a> {
/// Parses field inside a list. Use `Field::LIST_FIELD_DEFAULT_NAME`
/// if no field name is specified.
- /// E.g: `non-null Int64, field: 'foo'` or `non-null Int64`
- ///
- /// TODO: support metadata: `non-ull Int64, metadata: {"foo2": "value"}`
+ /// E.g: `"foo": non-null Int64`, `non-null Int64, field: 'foo'` or
`non-null Int64`
fn parse_list_field(&mut self, context: &str) -> ArrowResult<Field> {
+ if matches!(
+ self.tokenizer.peek(),
+ Some(Ok(Token::DoubleQuotedString(_)))
+ ) {
+ return self.parse_field();
+ }
Review Comment:
can we leave a short comment indicating which forms each of these paths are
meant to parse? especially making note we support parsing the old form for
backwards compatibility
##########
arrow-schema/src/datatype_parse.rs:
##########
@@ -128,7 +133,7 @@ impl<'a> Parser<'a> {
}
/// Parses the List type (called after `List` has been consumed)
- /// E.g: List(non-null Int64, field: 'foo')
+ /// E.g: List("foo": non-null Int64)
Review Comment:
should we keep both of the forms here in these examples to show that both
are supported?
--
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]