alamb commented on code in PR #2454:
URL: https://github.com/apache/arrow-datafusion/pull/2454#discussion_r867058066


##########
datafusion/core/src/sql/planner.rs:
##########
@@ -1608,11 +1608,19 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
                 } else {
                     match (var_names.pop(), var_names.pop()) {
                         (Some(name), Some(relation)) if var_names.is_empty() 
=> {
-                            // table.column identifier
-                            Ok(Expr::Column(Column {
-                                relation: Some(relation),
-                                name,
-                            }))
+                            if let Some(field) = 
schema.fields().iter().find(|f| f.name().eq(&relation)) {
+                                // Access to a field of a column which is a 
structure, example: SELECT my_struct.key

Review Comment:
   makes sense to me 👍  Nice work @ovr 



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