dharanad commented on code in PR #11273:
URL: https://github.com/apache/datafusion/pull/11273#discussion_r1666465297


##########
datafusion/sql/src/expr/mod.rs:
##########
@@ -597,7 +597,30 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             }
 
             SQLExpr::Struct { values, fields } => {
-                self.parse_struct(values, fields, schema, planner_context)
+                if !fields.is_empty() {
+                    return not_impl_err!("Struct fields are not supported 
yet");
+                }
+                fn is_named_struct(values: &Vec<sqlparser::ast::Expr>) -> bool 
{
+                    values
+                        .iter()
+                        .any(|value| matches!(value, SQLExpr::Named { .. }))
+                }
+
+                if is_named_struct(&values) {
+                    return self.create_named_struct(values, schema, 
planner_context);

Review Comment:
   Sure. I have made the change.



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