mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 11:52:27 +00:00
8f65dc4ff7
It is not always safe to implicitly rewrite a `tuple` function call to a literal. Even when the tuple has more then one element e.g. `SELECT (tuple(1, 2, 3) AS x).1` is not equivalent to `SELECT ((1, 2, 3) AS x).1`, the latter is interpreted as `SELECT tuple((1, 2, 3) AS x).1`.
11 lines
381 B
Bash
Executable File
11 lines
381 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
echo "select (tuple(1, 2, 3));" | "$CLICKHOUSE_FORMAT"
|
|
echo "select (tuple(1, 2, 3) as x);" | "$CLICKHOUSE_FORMAT"
|
|
echo "select (tuple(1, 2, 3)).1;" | "$CLICKHOUSE_FORMAT"
|
|
echo "select (tuple(1, 2, 3) as x).1;" | "$CLICKHOUSE_FORMAT"
|