itsjunetime commented on code in PR #11958:
URL: https://github.com/apache/datafusion/pull/11958#discussion_r1714423933
##########
datafusion/sql/src/parser.rs:
##########
@@ -523,9 +523,7 @@ impl<'a> DFParser<'a> {
Ok(n) => Ok(Value::Number(n, l)),
// The tokenizer should have ensured `n` is an integer
// so this should not be possible
- Err(e) => parser_err!(format!(
- "Unexpected error: could not parse '{n}' as number: {e}"
- )),
+ Err(e) => match e {},
Review Comment:
`e` is `Infallible`, so it can't be constructed. Since it can't be
constructed, this code path is unreachable, and that's what this proves. a
match with no arms has a return type of `!` since it can't ever be executed, so
it can be implicitly converted to any type, and can prove that a `Result`
cannot be its `Err` variant.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]