Skip to content

Code: 47. DB::Exception: Unknown expression or function identifier in scope WITH  #65233

@tatsiana-gnezdilova-idf

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

Metadata

Metadata

Assignees

Labels

analyzerIssues and pull-requests related to new analyzeranalyzer-importantbugConfirmed user-visible misbehaviour in official releaseunfinished code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions