Fix PR comments: check exception in the test

This commit is contained in:
Alexey Korepanov 2024-08-23 22:56:24 +02:00
parent 83fa51f400
commit b772140514
2 changed files with 6 additions and 0 deletions

View File

@ -11,3 +11,5 @@
{"data":["c", "1"]} {"data":["c", "1"]}
{"totals": ["", "3"]} {"totals": ["", "3"]}
{"statistics": {"rows":3, "elapsed":ELAPSED, "rows_read":3, "bytes_read":30}} {"statistics": {"rows":3, "elapsed":ELAPSED, "rows_read":3, "bytes_read":30}}
3
Value passed to 'throwIf' function is non-zero:

View File

@ -16,4 +16,8 @@ $CLICKHOUSE_CLIENT -q "SELECT 2;"
# Check Totals # Check Totals
$CLICKHOUSE_CLIENT -q "SELECT name, count() AS c FROM test_table GROUP BY name WITH TOTALS ORDER BY name FORMAT JSONCompactWithProgress settings max_block_size=2;" | grep -v --text "progress" | sed -E 's/"elapsed":[0-9]+\.[0-9]+/"elapsed":ELAPSED/g' $CLICKHOUSE_CLIENT -q "SELECT name, count() AS c FROM test_table GROUP BY name WITH TOTALS ORDER BY name FORMAT JSONCompactWithProgress settings max_block_size=2;" | grep -v --text "progress" | sed -E 's/"elapsed":[0-9]+\.[0-9]+/"elapsed":ELAPSED/g'
$CLICKHOUSE_CLIENT -q "SELECT 3;"
# Check exceptions
${CLICKHOUSE_CURL} -sS "$CLICKHOUSE_URL" -d "SELECT throwIf(number = 15), 1::Int64 as a, '\"' from numbers(100) format JSONCompactWithProgress settings output_format_json_quote_64bit_integers=1, max_block_size=10" | grep "exception" | cut -c42-88
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS test_table;" $CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS test_table;"