ClickHouse/tests/queries/0_stateless/02712_bool_better_exception_message.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
739 B
Bash
Raw Normal View History

2023-04-10 00:31:49 +00:00
#!/usr/bin/env bash
# Tags: no-fasttest
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
2023-04-10 01:31:43 +00:00
2023-04-10 00:31:49 +00:00
$CLICKHOUSE_LOCAL --multiquery <<END
2023-04-10 00:31:49 +00:00
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": 1}');
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": null}');
END
$CLICKHOUSE_LOCAL --multiquery <<END 2>&1 | rg -Fc "'w' character"
2023-04-10 00:31:49 +00:00
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": wtf}');
END
$CLICKHOUSE_LOCAL --multiquery <<END 2>&1 | rg -Fc "expected 'false'"
2023-04-10 00:31:49 +00:00
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": ftw}');
END
$CLICKHOUSE_LOCAL --multiquery <<END 2>&1 | rg -Fc "'{' character"
2023-04-10 00:31:49 +00:00
SELECT * FROM format(JSONEachRow, 'x Bool', '{"x": {}}');
END