mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Add tests for INSERT DEFAULT with format Values
This commit is contained in:
parent
6a0834499f
commit
699669b81d
@ -0,0 +1,8 @@
|
|||||||
|
0 1 33
|
||||||
|
0 42 33
|
||||||
|
1 42 2
|
||||||
|
2 42 33
|
||||||
|
3 42 3
|
||||||
|
4 42 3
|
||||||
|
5 42 33
|
||||||
|
6 6 33
|
16
tests/queries/0_stateless/02155_default_keyword_format_values.sh
Executable file
16
tests/queries/0_stateless/02155_default_keyword_format_values.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
# shellcheck source=../shell_config.sh
|
||||||
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
|
$CLICKHOUSE_CLIENT -q "CREATE TABLE IF NOT EXISTS default_table (x UInt32, y UInt32 DEFAULT 42, z UInt32 DEFAULT 33) ENGINE = Memory;"
|
||||||
|
|
||||||
|
echo "(DEFAULT, 1, DEFAULT), (1, DEFAULT, 2)" | $CLICKHOUSE_CLIENT --input_format_values_interpret_expressions=0 -q "INSERT INTO default_table FORMAT Values"
|
||||||
|
echo "(2, DEFAULT), (3, 3)" | $CLICKHOUSE_CLIENT --input_format_values_interpret_expressions=0 -q "INSERT INTO default_table(x, z) FORMAT Values"
|
||||||
|
|
||||||
|
echo "(DEFAULT, DEFAULT, DEFAULT), (4, DEFAULT, 3)" | $CLICKHOUSE_CLIENT --input_format_values_interpret_expressions=1 -q "INSERT INTO default_table FORMAT Values"
|
||||||
|
echo "(5, DEFAULT), (6, 6)" | $CLICKHOUSE_CLIENT --input_format_values_interpret_expressions=1 -q "INSERT INTO default_table(x, y) FORMAT Values"
|
||||||
|
|
||||||
|
$CLICKHOUSE_CLIENT --query="SELECT * FROM default_table ORDER BY x, y";
|
||||||
|
$CLICKHOUSE_CLIENT --query="DROP TABLE default_table"
|
Loading…
Reference in New Issue
Block a user