andygrove commented on code in PR #4942:
URL: https://github.com/apache/arrow-datafusion/pull/4942#discussion_r1072427186


##########
datafusion/common/src/error.rs:
##########
@@ -160,11 +158,11 @@ impl Display for SchemaError {
                 } else {
                     write!(f, "'{}'", field.name)?;
                 }
-                if let Some(fields) = valid_fields {
+                if !valid_fields.is_empty() {

Review Comment:
   I think it would be good to have a special case for this, otherwise it looks 
like the user would get the message `valid fields are `, which would be 
confusing.



-- 
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]

Reply via email to