What happened
NTILE(N) should validate its argument and reject an invalid row-dependent
column argument with a normal SQL error. Dolt reaches an internal row-index
failure.
Environment
Dolt main at commit a995f245c032bc412aed308194d81ee12bc74f6b0a1fae5fd40e0d
(dolt version 2.2.3).
How to reproduce
CREATE TABLE t(id INT PRIMARY KEY, n INT);
INSERT INTO t VALUES (1,0),(2,2);
SELECT id, NTILE(n) OVER (ORDER BY id) AS bucket
FROM t
ORDER BY id;
Expected result
MySQL rejects the query with a regular SQL error because NTILE(N) does not
accept an input column as N.
Actual result
Dolt reports:
unable to find field with index 2 in row of 0 columns.
This is a bug. Please file an issue here: https://github.com/dolthub/dolt/issues
What happened
NTILE(N)should validate its argument and reject an invalid row-dependentcolumn argument with a normal SQL error. Dolt reaches an internal row-index
failure.
Environment
Dolt main at commit
a995f245c032bc412aed308194d81ee12bc74f6b0a1fae5fd40e0d(
dolt version 2.2.3).How to reproduce
Expected result
MySQL rejects the query with a regular SQL error because
NTILE(N)does notaccept an input column as
N.Actual result
Dolt reports: