ClickHouse/tests/queries/0_stateless/02695_logical_optimizer_alias_bug.sql
2023-03-27 17:51:22 +02:00

3 lines
315 B
SQL

create table test_local (id UInt32, path LowCardinality(String)) engine = MergeTree order by id;
WITH ((position(path, '/a') > 0) AND (NOT (position(path, 'a') > 0))) OR (path = '/b') OR (path = '/b/') as alias1 SELECT max(alias1) FROM remote('127.0.0.{1,2}', currentDatabase(), test_local) WHERE (id = 299386662);