diff --git a/tests/queries/0_stateless/01278_format_multiple_queries.reference b/tests/queries/0_stateless/01278_format_multiple_queries.reference new file mode 100644 index 00000000000..cba2cc7b320 --- /dev/null +++ b/tests/queries/0_stateless/01278_format_multiple_queries.reference @@ -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 +; + diff --git a/tests/queries/0_stateless/01278_format_multiple_queries.sh b/tests/queries/0_stateless/01278_format_multiple_queries.sh new file mode 100755 index 00000000000..090e1f9d664 --- /dev/null +++ b/tests/queries/0_stateless/01278_format_multiple_queries.sh @@ -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 <