Files
turso/testing
Piotr Rzysko 30ae6538ee Treat table-valued functions as tables
With this change, the following two queries are considered equivalent:
```sql
SELECT value FROM generate_series(5, 50);
SELECT value FROM generate_series WHERE start = 5 AND stop = 50;
```
Arguments passed in parentheses to the virtual table name are now
matched to hidden columns.

Column references are still not supported as table-valued function
arguments. The only difference is that previously, a query like:
```sql
SELECT one.value, series.value
FROM (SELECT 1 AS value) one, generate_series(one.value, 3) series;
```
would cause a panic. Now, it returns a proper error message instead.

Adding support for column references is more nuanced for two main
reasons:
- We need to ensure that in joins where a TVF depends on other tables,
those other tables are processed first. For example, in:
```sql
SELECT one.value, series.value
FROM generate_series(one.value, 3) series, (SELECT 1 AS value) one;
```
the one table must be processed by the top-level loop, and series must
be nested.
- For outer joins involving TVFs, the arguments must be treated as ON
predicates, not WHERE predicates.
2025-07-14 07:16:53 +02:00
..
2024-08-03 12:16:34 +03:00
wip
2025-06-11 14:19:04 -03:00
2025-02-09 22:01:33 +04:00
2025-01-19 00:39:10 +05:30
2025-01-21 00:29:23 +05:30
2025-06-20 15:59:03 -03:00
2025-07-08 22:57:20 +08:00
2025-06-11 18:39:06 +02:00
2025-06-17 19:33:23 +02:00
2025-03-30 18:58:38 +03:00
2025-05-08 22:22:55 +08:00
2025-05-11 23:47:30 +08:00
2025-06-17 19:33:23 +02:00
2025-04-15 12:45:46 -03:00
2025-02-04 21:02:51 +05:30
2025-07-09 14:58:24 -04:00
2024-10-05 18:25:04 +03:00
2025-06-07 17:37:36 +09:00
2025-05-23 17:45:56 +08:00

Limbo Testing