mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
15 lines
406 B
Bash
15 lines
406 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||
|
# shellcheck source=../shell_config.sh
|
||
|
. "$CUR_DIR"/../shell_config.sh
|
||
|
|
||
|
q=$($CLICKHOUSE_FORMAT <<<"SELECT * REPLACE(1/3/3 AS dummy)")
|
||
|
echo "$q"
|
||
|
$CLICKHOUSE_FORMAT <<<"$q"
|
||
|
|
||
|
# multiple columns
|
||
|
q=$($CLICKHOUSE_FORMAT <<<"SELECT * REPLACE STRICT (1 AS id, 2 AS value) FROM (SELECT 0 id, 1 value)")
|
||
|
echo "$q"
|
||
|
$CLICKHOUSE_FORMAT <<<"$q"
|