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

Alias column name is not recognized with union operator #29364

Closed
ramanich1 opened this issue Nov 2, 2021 · 3 comments
Closed

Alias column name is not recognized with union operator #29364

ramanich1 opened this issue Nov 2, 2021 · 3 comments
Assignees
Labels
severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@ramanich1
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

select 1 as a,(select a union select a);

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

+---+---------------------------+
| a | (select a union select a) |
+---+---------------------------+
| 1 |                         1 |
+---+---------------------------+
1 row in set (0.04 sec)

3. What did you see instead (Required)

ERROR 1054 (42S22): Unknown column 'a' in 'field list'

4. What is your TiDB version? (Required)

+-------------------------+--------------------------------------------------------------------------+
| Variable_name           | Value                                                                    |
+-------------------------+--------------------------------------------------------------------------+
| innodb_version          | 5.6.25                                                                   |
| protocol_version        | 10                                                                       |
| tidb_analyze_version    | 2                                                                        |
| tidb_row_format_version | 2                                                                        |
| tls_version             | TLSv1,TLSv1.1,TLSv1.2                                                    |
| version                 | 5.7.25-TiDB-v5.2.1                                                       |
| version_comment         | TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible |
| version_compile_machine | x86_64                                                                   |
| version_compile_os      | osx10.8                                                                  |
+-------------------------+--------------------------------------------------------------------------+
@ramanich1 ramanich1 added the type/bug The issue is confirmed as a bug. label Nov 2, 2021
@yudongusa
Copy link

Lower severity to moderate as this is not blocking issue, and will be resolved with moderate optimizer priority.

@winoros
Copy link
Member

winoros commented Nov 23, 2021

It's a duplicate issue with #8190. We need an elegant code refactoring to solve this problem.
You can track the #8190 instead.
So closed since it's duplicated.

@winoros winoros closed this as completed Nov 23, 2021
@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants