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
Is your feature request related to a problem or challenge?
When we use unnest, we may use it as a subexpression, for example:
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:
For example, above SQL will be translated to:
Describe alternatives you've considered
No response
Additional context
No response