Skip to content
New issue

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

Parse failed when execute desc view with window function #35916

Closed
Defined2014 opened this issue Jul 4, 2022 · 0 comments · Fixed by #37077
Closed

Parse failed when execute desc view with window function #35916

Defined2014 opened this issue Jul 4, 2022 · 0 comments · Fixed by #37077
Assignees
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Defined2014 commented Jul 4, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `test1` (
`id` int(0) NOT NULL,
`num` int(0) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

create or replace view test1_v as
(select id,row_number() over (partition by num) from test1);

desc test1_v;

2. What did you expect to see? (Required)

success

3. What did you see instead (Required)

parse failed

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()
                                                                                                                                    |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v6.2.0-alpha-263-gaa7a0fbdc
Edition: Community
Git Commit Hash: aa7a0fbdc30880ad6bd03f9ae39489a176340917
Git Branch: master
UTC Build Time: 2022-07-04 06:06:30
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Store: unistore |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

The root case is we use an internal session which didn't set tidb_enable_window_function = true to execute tryFillViewColumnType

@Defined2014 Defined2014 added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/moderate labels Jul 4, 2022
@Defined2014 Defined2014 changed the title Parse failed when execute desc view_t Parse failed when execute desc view Jul 4, 2022
@Defined2014 Defined2014 changed the title Parse failed when execute desc view Parse failed when execute desc view with window function Jul 4, 2022
@jebter jebter added the affects-6.1 This bug affects the 6.1.x(LTS) versions. label Jul 4, 2022
@hawkingrei hawkingrei assigned hawkingrei and unassigned hawkingrei Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants