-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
These clauses are very dangerous, because they introduce false positives. If the parser only supports a subset of SQL, it should error out otherwise. Not silently corrupt the query.
Also the parser swallows all column names. Maybe there should also be a way to also check for equality of the column names?
Reproducer:
CREATE TABLE sales (
sale_id INTEGER,
product_id INTEGER,
PRIMARY KEY (sale_id)
);
SELECT
sale_id,
ROW_NUMBER() OVER (
PARTITION BY product_id
ORDER BY product_id
) as col_name
FROM sales;
SELECT
sale_id,
ROW_NUMBER() OVER ()
FROM sales;
Metadata
Metadata
Assignees
Labels
No labels