YjyJeff opened a new issue, #9591:
URL: https://github.com/apache/arrow-datafusion/issues/9591
### Is your feature request related to a problem or challenge?
When we use unnest, we may use it as a subexpression, for example:
```
select unnest(array_remove(col, 1)) as a from unnest_table;
```
Currently, datafusion does not support it and will report a bug.
### Describe the solution you'd like
Translate the unnest function to the following pattern:
```
Projection expr_to_execute_the_parent_expr_of_unnest
Unnest unnest_column
Projection expr_to_execute_the_child_expr_of_unnest
```
For example, above SQL will be translated to:
```
Projection Alias(unnest(array_remove(col, 1)), a)
Unnest unnest(array_remove(col,1))
Projection array_remove(col, 1) as unnest(array_remove(col, 1))
```
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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]