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

Can't find column XXX in schema Column #41986

Closed
xingyong opened this issue Mar 7, 2023 · 2 comments · Fixed by #46419
Closed

Can't find column XXX in schema Column #41986

xingyong opened this issue Mar 7, 2023 · 2 comments · Fixed by #46419
Assignees
Labels
affects-6.1 affects-6.5 affects-7.0 affects-7.1 report/community The community has encountered this bug. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@xingyong
Copy link

xingyong commented Mar 7, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE poi_clearing_time_topic (
effective_date datetime DEFAULT NULL ,
clearing_time int(11) DEFAULT NULL
);

SELECT
GROUP_CONCAT(stlmnt_hour order by effective_date DESC)
-- GROUP_CONCAT(stlmnt_hour )
FROM
(
SELECT
(COALESCE(pct.clearing_time, 0)/3600000) AS stlmnt_hour
,COALESCE(pct.effective_date, '1970-01-01 08:00:00') AS effective_date
FROM
poi_clearing_time_topic pct
ORDER BY
pct.effective_date DESC
) a;

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

no error.

3. What did you see instead (Required)

the sql returns error: Can't find column a.effective_date in schema Column: [stlmnt_hour,effective_date,test.pct.effective_date] Unique key: []

4. What is your TiDB version? (Required)

3.0, 5.0, 6.1 (maybe all versions)

@xingyong xingyong added the type/bug The issue is confirmed as a bug. label Mar 7, 2023
@Defined2014
Copy link
Contributor

Maybe same as #41957, PTAL @xuyifangreeneyes

@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 labels Mar 8, 2023
@AilinKid AilinKid self-assigned this Aug 24, 2023
@AilinKid AilinKid added affects-6.1 affects-6.5 and removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.1 may-affects-6.5 labels Aug 25, 2023
ti-chi-bot bot pushed a commit that referenced this issue Sep 20, 2023
@seiya-annie
Copy link

/found community

@ti-chi-bot ti-chi-bot bot added the report/community The community has encountered this bug. label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 affects-6.5 affects-7.0 affects-7.1 report/community The community has encountered this bug. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants