Skip to content

Problem with Array(Tuple(LowCardinality(String), Int32)) #9766

@glebvk85

Description

@glebvk85

I have a table

CREATE TABLE table (
	id Int32,
	values Array(Tuple(LowCardinality(String), Int32)),
	date Date
) ENGINE MergeTree()
PARTITION BY toYYYYMM(date)
ORDER BY (id, date)

but when executing the request

SELECT count(*)
FROM table
WHERE (arrayExists(x -> ((x.1) = toLowCardinality('pattern')), values) = 1)

I get an error

Code: 49. DB::Exception: Received from clickhouse:9000. DB::Exception: Cannot capture column 3 because it has incompatible type: got String, but LowCardinality(String) is expected..

If I replace the column 'values'
values Array(Tuple(String, Int32))
then the request is executed without errors.

What could be the problem when using Array(Tuple(LowCardinality(String), Int32))?

ClickHouse version 20.3.3

Metadata

Metadata

Labels

comp-datatype-wrapperType modifiers/wrappers (Nullable, LowCardinality, etc.).questionQuestion?

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions