mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
8bca80f4dd
It is too tricky to verify does brackets required or not, i.e. "SELECT * REPLACE(1/3/3 AS dummy)" will be formatted to "SELECT * REPLACE (1/3)/3 AS dummy" which is already invalid query. So let's simply always print them. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> v2: move the fix into correct place ASTColumnsReplaceTransformer::formatImpl() instead of ASTColumnsReplaceTransformer::Replacement::formatImpl()
17 lines
284 B
Plaintext
17 lines
284 B
Plaintext
SELECT * REPLACE ((1 / 3) / 3 AS dummy)
|
|
SELECT * REPLACE ((1 / 3) / 3 AS dummy)
|
|
SELECT * REPLACE STRICT (1 AS id, 2 AS value)
|
|
FROM
|
|
(
|
|
SELECT
|
|
0 AS id,
|
|
1 AS value
|
|
)
|
|
SELECT * REPLACE STRICT (1 AS id, 2 AS value)
|
|
FROM
|
|
(
|
|
SELECT
|
|
0 AS id,
|
|
1 AS value
|
|
)
|