alamb commented on code in PR #16610:
URL: https://github.com/apache/datafusion/pull/16610#discussion_r2173737830


##########
datafusion/sql/tests/cases/plan_to_sql.rs:
##########
@@ -2596,3 +2600,27 @@ fn test_not_ilike_filter_with_escape() {
         @"SELECT person.first_name FROM person WHERE person.first_name NOT 
ILIKE 'A!_%' ESCAPE '!'"
     );
 }
+
+#[test]
+fn test_struct_expr() {

Review Comment:
   Is it possible to test using the non struct syntax too?
   
   Like `SELECT ["ProductName"]["product"]`?



##########
datafusion/sql/src/unparser/expr.rs:
##########
@@ -639,9 +630,27 @@ impl Unparser<'_> {
             )
             }
         };
-        id.push(field);
 
-        Ok(ast::Expr::CompoundIdentifier(id))
+        match &args[0] {
+            Expr::Column(col) => {

Review Comment:
   I wonder if we could just convert this like any other normal expression 🤔 



-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to