Use this issue to track InQL RFC 021, which already exists at docs/rfcs/021_generator_table_functions.md.
Area
- Specification (RFCs)
- Package & tests
- Documentation
Summary
RFC 021 defines generator and table-valued functions for InQL, including explode, explode_outer, posexplode, posexplode_outer, inline, inline_outer, flatten, stack, and selected tuple-producing extraction helpers.
Motivation
These functions change relation shape or cardinality, so they must be modeled as relation operations rather than scalar expressions.
Proposal sketch
The RFC defines generator and table-valued function boundaries, placement rules, output aliasing, schema effects, and compatibility limits. It keeps relation-shaping functions distinct from nested scalar functions in RFC 020.
Open design questions to resolve before Planned:
- Should positional generators use zero-based or one-based positions?
- Should
.explode(...) preserve all input columns by default?
- What aliasing syntax should be required for generated output columns?
- What subset of Snowflake-style
flatten behavior belongs in portable InQL versus a warehouse compatibility extension?
Alternatives considered
The RFC rejects modeling generators as scalar functions returning arrays, allowing generators anywhere a scalar expression is allowed, and supporting only explode without settling the broader class boundary.
Impact / compatibility
This RFC affects relation-shaping APIs, query syntax placement checks, schema updates after generator use, Prism/Substrait lowering for cardinality changes, and docs explaining generator cardinality/schema effects.
Implementation notes (optional)
Coordinate with RFC 020 so nested scalar operations and generator/table-valued operations remain separate and diagnostically clear.
Checklist
Use this issue to track InQL RFC 021, which already exists at
docs/rfcs/021_generator_table_functions.md.Area
Summary
RFC 021 defines generator and table-valued functions for InQL, including
explode,explode_outer,posexplode,posexplode_outer,inline,inline_outer,flatten,stack, and selected tuple-producing extraction helpers.Motivation
These functions change relation shape or cardinality, so they must be modeled as relation operations rather than scalar expressions.
Proposal sketch
The RFC defines generator and table-valued function boundaries, placement rules, output aliasing, schema effects, and compatibility limits. It keeps relation-shaping functions distinct from nested scalar functions in RFC 020.
Open design questions to resolve before Planned:
.explode(...)preserve all input columns by default?flattenbehavior belongs in portable InQL versus a warehouse compatibility extension?Alternatives considered
The RFC rejects modeling generators as scalar functions returning arrays, allowing generators anywhere a scalar expression is allowed, and supporting only
explodewithout settling the broader class boundary.Impact / compatibility
This RFC affects relation-shaping APIs, query syntax placement checks, schema updates after generator use, Prism/Substrait lowering for cardinality changes, and docs explaining generator cardinality/schema effects.
Implementation notes (optional)
Coordinate with RFC 020 so nested scalar operations and generator/table-valued operations remain separate and diagnostically clear.
Checklist