zed
zed copied to clipboard
SQL: cannot apply aliased columns to dynamically typed data
tl;dr
$ super -f text -c "SELECT x, y FROM 'a.csv' i1(x, y);"
cannot apply aliased columns to dynamically typed data at line 1, column 26:
SELECT x, y FROM 'a.csv' i1(x, y);
~~~~~~~~
Details
Repro is with super commit 850e978. This is based on a query from a sqllogictest.
With input file a.csv:
i,j
42,84
The following query with table aliasing with column renaming fails.
$ super -version
Version: 850e97898
$ super -f text -c "SELECT x, y FROM 'a.csv' i1(x, y);"
cannot apply aliased columns to dynamically typed data at line 1, column 26:
SELECT x, y FROM 'a.csv' i1(x, y);
~~~~~~~~
However, it succeeds in other SQL-based systems, e.g.,
$ duckdb --version
v1.3.0 71c5c07cdd
$ duckdb -c "SELECT x, y FROM 'a.csv' i1(x, y);"
┌───────┬───────┐
│ x │ y │
│ int64 │ int64 │
├───────┼───────┤
│ 42 │ 84 │
└───────┴───────┘