GitHub user duongcongtoai closed a discussion: New logical plan for unnest struct type
I'm implementing[ unnest for struct type column](https://github.com/apache/datafusion/issues/10264). For now we only support unnest for list type in [this executor](https://github.com/apache/datafusion/blob/0dfc66da3814616b3e7d7832d685e5b40ac2dc92/datafusion/core/src/physical_plan/unnest.rs#L46) While unnest on list will increases the number of rows of the input, unnest on struct will keep the output rows the same, while flatten the fields of the struct into new columns. To me i think we should have this difference be aware at logical plan layer, meaning we add a new option called UnnestStruct [to this enum](https://github.com/apache/datafusion/blob/0dfc66da3814616b3e7d7832d685e5b40ac2dc92/datafusion/expr/src/logical_plan/plan.rs#L127). Reference from polar: https://github.com/pola-rs/polars/blob/eb7f9391cb7f2fb6984b6a72581168c5425abcfe/crates/polars-plan/src/logical_plan/functions/schema.rs#L53 they have separate logical node for explode (unnest on list) and unnest (unnest on struct) wdyt GitHub link: https://github.com/apache/datafusion/discussions/10385 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
