Skip to content

Non-constant right hand side of IN #58242

@alexey-milovidov

Description

@alexey-milovidov
milovidov-desktop :) SELECT number FROM numbers(10) WHERE number % 2 IN (number % 3, number % 5)

Received exception:
Code: 47. DB::Exception: Missing columns: 'number' while processing query: 'number % 3', required columns: 'number' 'number': While processing (number % 2) IN (number % 3, number % 5). (UNKNOWN_IDENTIFIER)

It can be done in the following way:

  • support non-constant case for IN [array] as full scan (has);
  • interpreting non-constant IN (set) in the same way as IN [array].

Metadata

Metadata

Assignees

Labels

comp-sql-syntaxSQL/grammar parsing, AST nodes, syntax-level features.featurewarmup taskThe task for new ClickHouse team members. Low risk, moderate complexity, no urgency.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions