-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Code: 47. DB::Exception: Unknown expression or function identifier in scope WITH #65233
Copy link
Copy link
Closed
Closed
Copy link
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzeranalyzer-importantbugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releaseunfinished code
Description
ID Finance
Our solution (under 23.8.2 of clickhouse) contains this feature within WITH clause:
create table test
(
raw_id String,
columns_n Nested
(
col_1 Nullable(String),
col_2 Nullable(String)
)
)
Engine = MergeTree
order by (raw_id);
insert into test
VALUES('1', ['type_1','type_2','type_1'],['0','0','1']),
('2', ['type_3','type_2','type_1'],['0','1','1']),
('3', ['type_1','type_2','type_3'],['1','0','1'])
;
**with t like '%_1%' as issue
select raw_id,
arrayFilter((t, t2) -> (not issue),
columns_n.col_1,
columns_n.col_2
)
from test;**
When we try to use the same feature in clickhouse version 24.5.1 we get the following error:
Code: 47. DB::Exception: Unknown expression or function identifier 't' in scope WITH t LIKE '%_1%' AS issue SELECT raw_id, arrayFilter((t, t2) -> (NOT issue), columns_n.col_1, columns_n.col_2) FROM test (UNKNOWN_IDENTIFIER) (version 24.5.1.1763 (official build)
It worked only when I used
SETTINGS allow_experimental_analyzer = 0;
The question is:
Will our solution require additional tweaks when the old analyzer will be deprecated fully (meaning we won't be able to use SETTINGS allow_experimental_analyzer = 0;)
Regards
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzeranalyzer-importantbugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releaseunfinished code