Changelog
WITH ORDINALITY improvements
08.21.2025
WITH ORDINALITY adds a numbering column to table function output. For example, you can number list items when unnesting lists:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
sql
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
text
You can use the ROWS FROM clause to zip the outputs of multiple table functions rather than taking their cross product:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
sql
1 | |
2 | |
3 | |
4 | |
5 | |
text
We have rewritten how we implement the WITH ORDINALITY and ROWS FROM clauses, and thus fixed a performance issue and an incorrect ordering bug.