mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
9242654231
v0: negate: add parens for negative values Before this patch -(-1) was formatted to --1, but this is not valid syntax. v2: replace special case with parens, otherwise formatting of -(-(-1)) will be unstable, in v0 it was formatted to -(1) but -(1) is formatted to -1 [1]. [1]: https://clickhouse-test-reports.s3.yandex.net/24427/4512460aeb02fec557c558eee3f8291a6297efb2/fuzzer_asan/fuzzer.log
14 lines
302 B
Plaintext
14 lines
302 B
Plaintext
-- { echo }
|
|
EXPLAIN SYNTAX SELECT -1;
|
|
SELECT -1
|
|
EXPLAIN SYNTAX SELECT -(1);
|
|
SELECT -(1)
|
|
EXPLAIN SYNTAX SELECT -(-(1));
|
|
SELECT -(-(1))
|
|
EXPLAIN SYNTAX SELECT -(-(-(1)));
|
|
SELECT -(-(-(1)))
|
|
EXPLAIN SYNTAX SELECT -(-(-1));
|
|
SELECT -(-(-1))
|
|
EXPLAIN SYNTAX SELECT -(-toUInt64(-(1)));
|
|
SELECT -(-toUInt64(-(1)))
|