etseidl commented on code in PR #8890:
URL: https://github.com/apache/arrow-rs/pull/8890#discussion_r2546861657
##########
arrow-schema/src/datatype_parse.rs:
##########
@@ -547,11 +547,15 @@ impl<'a> Parser<'a> {
))
}
- /// return and consume if the next token is `Token::Nullable`
+ /// consume the next token and return `false` if the field is `nonnull`.
fn parse_opt_nullable(&mut self) -> bool {
- self.tokenizer
- .next_if(|next| matches!(next, Ok(Token::Nullable)))
- .is_some()
+ let tok = self
+ .tokenizer
+ .next_if(|next| matches!(next, Ok(Token::NonNull |
Token::Nullable)));
+ match tok {
+ Some(Ok(Token::NonNull)) => false,
+ _ => true,
+ }
Review Comment:
I retained the "nullable" token because there was a backwards compatibility
test that required it. I'm not familiar with the old display behavior, so if
nothing used to emit "nullable" then this can be simplified.
--
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]