Draft
Conversation
Implements plan.RowsFrom node and RowsFromRowIter for executing multiple set-returning functions in parallel and zipping their results together. When one function is exhausted before another, NULL is used for padding. This enables PostgreSQL-compatible ROWS FROM syntax: SELECT * FROM ROWS FROM(func1(...), func2(...)) Also supports WITH ORDINALITY and column aliases.
myers
added a commit
to myers/doltgresql
that referenced
this pull request
Feb 1, 2026
Expands multi-argument UNNEST(arr1, arr2, ...) into ROWS FROM(unnest(arr1), unnest(arr2), ...) which properly zips results together with NULL padding for shorter arrays. Changes: - table_expr.go: Detect and expand multi-arg UNNEST to RowsFromExpr - aliased_table_expr.go: Support WITH ORDINALITY via RowsFromExpr - select_clause.go: Update multi-arg UNNEST rewrite to use RowsFromExpr Depends on: - dolthub/vitess#454 - dolthub/go-mysql-server#3412
This was referenced Feb 1, 2026
myers
added a commit
to myers/doltgresql
that referenced
this pull request
Feb 3, 2026
- Add comprehensive tests for explicit ROWS FROM syntax: - ROWS FROM with generate_series - ROWS FROM with unnest - ROWS FROM with mixed functions - Fix table_expr.go and aliased_table_expr.go to use RowsFromExpr for all multi-function ROWS FROM cases, not just multi-arg UNNEST Depends on: - dolthub/vitess#454 - dolthub/go-mysql-server#3412
Add BuildMultiExprTableFunc factory variable for nameless TableFuncExpr (ROWS FROM pattern), overridable by Doltgres. Remove plan.RowsFrom and RowsFromIter which move to doltgresql as an ExecBuilderNode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ROWS FROM table function support for executing multiple set-returning functions in parallel and zipping their results together.
plan.RowsFromnode for ROWS FROM table expressionsRowsFromRowIterto execute multiple SRFs in parallel with NULL paddingbuildRowsFromin planbuilder to handleRowsFromExprThis enables PostgreSQL-compatible ROWS FROM syntax:
When one function is exhausted before another, NULL is used for padding.
Related PRs
Test plan