mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Added multiline test
This commit is contained in:
parent
580c218680
commit
bd77908c93
@ -0,0 +1,16 @@
|
||||
SELECT
|
||||
a,
|
||||
b AS x
|
||||
FROM table AS t
|
||||
INNER JOIN table2 AS t2 ON t.id = t2.t_id
|
||||
WHERE 1 = 1
|
||||
;
|
||||
|
||||
SELECT
|
||||
a,
|
||||
b AS x,
|
||||
if(x = 0, a, b)
|
||||
FROM table2 AS t
|
||||
WHERE t.id != 0
|
||||
;
|
||||
|
18
tests/queries/0_stateless/01278_format_multiple_queries.sh
Executable file
18
tests/queries/0_stateless/01278_format_multiple_queries.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
set -e
|
||||
|
||||
format="$CLICKHOUSE_FORMAT -n"
|
||||
|
||||
$format <<EOF
|
||||
SELECT a, b AS x FROM table AS t
|
||||
JOIN table2 AS t2 ON (t.id = t2.t_id)
|
||||
WHERE 1 = 1
|
||||
;
|
||||
SELECT a, b AS x,
|
||||
x == 0 ? a : b
|
||||
FROM table2 AS t WHERE t.id != 0
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user