You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/06 18:06:40 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2454: feat: Support CompoundIdentifier as GetIndexedField access

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org