ClickHouse/tests/queries/0_stateless/02476_fix_lambda_parsing.sh
Nikolay Degterinsky 3d0f0e3896 Apply another fix
2022-11-07 14:13:02 +00:00

22 lines
573 B
Bash
Executable File

#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
set -e
format="$CLICKHOUSE_FORMAT"
echo "SELECT f(x, tuple(y) -> z)" | $format
echo "SELECT f(x, (y) -> z)" | $format
echo "SELECT f(x, y -> z)" | $format
echo "SELECT f((x, y) -> z)" | $format
echo "SELECT f(tuple(x, y) -> z)" | $format
echo "SELECT f(x, (x, y) -> z)" | $format
echo "SELECT f(x, tuple(x, y) -> z)" | $format
echo "CREATE FUNCTION func AS x -> plus(x, (x -> ('2' + 2)) -> plus(1), 1)" | $format | $format