mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
82e7e7d9cb
Do not use subquery result, when value is unknown, for constant folding. v2: fix simple subqueries, fixes 00597_push_down_predicate. v3: - use identity over introducing yet another cast analog (as suggested by @akuzm) - simpler suitable_for_const_folding check v4: use identity(cast()) since only cast() can provide corrent type (for data types that does not have it's own type, i.e. DateTime) v5: do not optimize consts if only_analyze isset, regardless the block content
5 lines
302 B
SQL
5 lines
302 B
SQL
-- { echo }
|
|
SELECT * FROM (SELECT (SELECT * FROM system.numbers LIMIT 1 OFFSET 1) AS n, toUInt64(10 / n)) FORMAT CSV;
|
|
SELECT (SELECT * FROM system.numbers LIMIT 1 OFFSET 1) AS n, toUInt64(10 / n) FORMAT CSV;
|
|
EXPLAIN SYNTAX SELECT (SELECT * FROM system.numbers LIMIT 1 OFFSET 1) AS n, toUInt64(10 / n);
|