We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
create table t (a int, b int); explain select a, b as a from t order by (sum(a) over(partition by a));
ERROR 1052 (23000): Column 'a' in window partition by is ambiguous
SQL complies successfully.
tidb-server -V
select tidb_version();
#8630
The text was updated successfully, but these errors were encountered:
It has been fixed in release 4.0:
TiDB(root@127.0.0.1:test) > set @@tidb_enable_window_function = 1; Query OK, 0 rows affected (0.00 sec) TiDB(root@127.0.0.1:test) > explain select a, b as a from t order by (sum(a) over(partition by a)); +----------------------------------+----------+-----------+---------------------------------------------------------------------------------+ | id | estRows | task | operator info | +----------------------------------+----------+-----------+---------------------------------------------------------------------------------+ | Projection_8 | 10000.00 | root | test.t.a, test.t.b | | └─Sort_9 | 10000.00 | root | Column#5:asc | | └─Shuffle_15 | 10000.00 | root | execution info: concurrency:4, data source:TableReader_13 | | └─Window_11 | 10000.00 | root | sum(cast(test.t.a, decimal(65,0) BINARY))->Column#5 over(partition by test.t.a) | | └─Sort_14 | 10000.00 | root | test.t.a:asc | | └─TableReader_13 | 10000.00 | root | data:TableFullScan_12 | | └─TableFullScan_12 | 10000.00 | cop[tikv] | table:t, keep order:false, stats:pseudo | +----------------------------------+----------+-----------+---------------------------------------------------------------------------------+ 7 rows in set (0.00 sec)
Sorry, something went wrong.
No branches or pull requests
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
ERROR 1052 (23000): Column 'a' in window partition by is ambiguous
SQL complies successfully.
tidb-server -V
or runselect tidb_version();
on TiDB)?#8630
The text was updated successfully, but these errors were encountered: