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 2021/06/26 21:05:18 UTC

[GitHub] [arrow-datafusion] houqp commented on a change in pull request #628: Added composite identifiers to get field of struct.

houqp commented on a change in pull request #628:
URL: https://github.com/apache/arrow-datafusion/pull/628#discussion_r659223746



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -79,6 +79,22 @@ pub struct SqlToRel<'a, S: ContextProvider> {
     schema_provider: &'a S,
 }
 
+fn plan_compound(mut identifiers: Vec<String>) -> Expr {
+    if &identifiers[0][0..1] == "@" {
+        Expr::ScalarVariable(identifiers)
+    } else if identifiers.len() == 2 {

Review comment:
       worth considering a follow up PR to handle an edge case where user tries to access nested field with unqualified column `column.field`. for compound identifiers, we should probably check the first identify to see if it's a valid relation name.




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