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

system.errors contains errors about UNKNOWN_IDENTIFIER but result of query correctly returns #51487

Closed
Slach opened this issue Jun 27, 2023 · 2 comments · Fixed by #54306
Closed
Assignees

Comments

@Slach
Copy link
Contributor

Slach commented Jun 27, 2023

Describe what's wrong

https://fiddle.clickhouse.com/c84cacb1-52da-48e2-9847-b9c825822adf

SELECT *
FROM
(
    SELECT *
    FROM system.numbers
    LIMIT 2
) AS n1
INNER JOIN
(
    SELECT *
    FROM system.numbers
    LIMIT 2
) AS n2 ON n1.number = n2.number
FORMAT Vertical;

return good result

but

SELECT * FROM system.errors FORMAT Vertical;

Row 1:
──────
name:               UNKNOWN_IDENTIFIER
code:               47
value:              1
last_error_time:    2023-06-27 14:14:10
last_error_message: Missing columns: 'n2.number' 'number' while processing query: 'number = n2.number', required columns: 'number' 'n2.number' 'number' 'n2.number'
last_error_trace:   [238324885,142758764,333694553,333731958,334242974,333710837,330390322,330372317,331033798,331024595,330082110,334346583,334332846,348996900,349085817,398655028,398659665,400219399,400209724,140092740037443,140092740631476]
remote:             0

Doesn't reproduce with analyzer

https://fiddle.clickhouse.com/3460c127-cf5b-451d-9b17-1b3948e9cc99

@Slach Slach added the potential bug To be reviewed by developers and confirmed/rejected. label Jun 27, 2023
@den-crane den-crane added unexpected behaviour and removed potential bug To be reviewed by developers and confirmed/rejected. labels Jun 27, 2023
@tavplubix
Copy link
Member

tavplubix commented Jun 27, 2023

Introduced in #25894, related to tryEvaluateConstCondition

@tavplubix
Copy link
Member

Another report: #54296

@Slach Slach changed the title system.errors contains errors about UNKNOWN_IDENTIFIER but result of query correcntly returns system.errors contains errors about UNKNOWN_IDENTIFIER but result of query correctly returns Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants