Expand description
E5.2 โ LATERAL / UNNEST SQL pre-processing.
DataFusion 53 supports UNNEST inside SELECT and FROM clauses for
fixed-size arrays. This module provides:
- Detection: identify UNNEST calls in SQL text before passing to DataFusion.
- Rewriter: normalise the common
LATERAL UNNESTidiom to a canonical form that DataFusion can plan (CROSS JOIN UNNEST). - NodeOp builder: return a
NodeOp::Unnestdescriptor so the Krishiv plan layer can record the unnest operator.
Functionsยง
- build_
unnest_ op - Build a
NodeOp::Unnestdescriptor. - contains_
lateral - Returns
trueifsqlcontains aLATERALkeyword (case-insensitive). - contains_
unnest - Returns
trueifsqlcontains anUNNESTcall (case-insensitive). - rewrite_
lateral_ unnest - Rewrite
LATERAL UNNEST(...)idioms to a form DataFusion understands.