universalmind303 opened a new issue, #9138:
URL: https://github.com/apache/arrow-datafusion/issues/9138

   ### Describe the bug
   
   flatten only supports `List` not `FixedSizeList`
   
   ### To Reproduce
   
   ```sql
   select flatten(some_fixed_size_list;
   
   Error: Internal error: Not reachable, data_type should be List.
   This was likely caused by a bug in DataFusion's code and we would welcome 
that you file an bug report in our issue tracker
   
   ```
   
   ### Expected behavior
   
   flatten behaves the same on both `List` and `FixedSizeList`
   
   ### Additional context
   
   ```rs
    BuiltinScalarFunction::Flatten => {
                   fn get_base_type(data_type: &DataType) -> Result<DataType> {
                       match data_type {
                           DataType::List(field) => match field.data_type() {
                               DataType::List(_) => 
get_base_type(field.data_type()),
                               _ => Ok(data_type.to_owned()),
                           },
                           _ => internal_err!("Not reachable, data_type should 
be List"),
                       }
                   }
   
                   let data_type = get_base_type(&input_expr_types[0])?;
                   Ok(data_type)
               }
   ```
   
   probably just need to add a branch here for `FixedSizeList`


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

Reply via email to