Lordworms commented on code in PR #14521:
URL: https://github.com/apache/datafusion/pull/14521#discussion_r1946158176
##########
datafusion/common/src/column.rs:
##########
@@ -299,6 +301,23 @@ impl Column {
.flat_map(|s| s.columns())
.collect(),
})
+ .map_err(|e| match &e {
+ DataFusionError::SchemaError(
+ SchemaError::FieldNotFound {
+ field,
+ valid_fields,
+ },
+ _,
+ ) => {
+ let mut diagnostic = Diagnostic::new_error(
+ format!("column '{}' not found", &field.name()),
+ field.spans().first(),
+ );
+ add_possible_columns_to_diag(&mut diagnostic, field,
valid_fields);
+ e.with_diagnostic(diagnostic)
+ }
+ _ => e,
+ })
Review Comment:
I think it is needed since I use the name with qualifier so the user would
get info for query
```
select id from a, b;
```
they would get
```
Did you want a.id or b.id
```
it is still helpful I guess?
--
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]