tobixdev commented on code in PR #17986:
URL: https://github.com/apache/datafusion/pull/17986#discussion_r2450629905


##########
datafusion/sql/src/planner.rs:
##########
@@ -600,27 +602,54 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             SQLDataType::Array(ArrayElemTypeDef::AngleBracket(inner_sql_type)) 
=> {
                 // Arrays may be multi-dimensional.
                 let inner_data_type = self.convert_data_type(inner_sql_type)?;
-                Ok(DataType::new_list(inner_data_type, true))
+
+                // Lists are allowed to have an arbitrarily named field;

Review Comment:
   I see there is `Field::new_list_field` that handles the default name.
   
   Maybe, `Field::new_list_field(inner_data_type.data_type(), 
inner_data_type.nullable()).with_meta_data(inner_data_type.metadata())` (or 
similar) would do the trick without leaking the "item" constant.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to