only supported for constants and CTE error in click house

26 Views Asked by At

I encounteerd this error in clickhouse: sadf Resolve identifier 'locality' from parent scope only supported for constants and CTE. Actual default.peoples.locality node type COLUMN.

the query is:

SELECT (
    SELECT arrayDistinct(groupArray(zipcode))
    FROM mapping
    WHERE has(city_list, lower(locality))
) AS zip_list
FROM peoples
LIMIT 10

SETTINGS allow_experimental_analyzer = 1

like this question https://github.com/ClickHouse/ClickHouse/issues/6932 but I can't rewrite my query to join query, because has can't in join in, what should I do?

related link: https://github.com/ClickHouse/ClickHouse/issues/6697

thanks.

0

There are 0 best solutions below