Skip to content

Commit 16e116c

Browse files
Add a test for calculated default expressions in CSVWithNames
1 parent ca36de6 commit 16e116c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Hello 123 Hello, 123
2+
World 456 World, 456
3+
Hello 123 x
4+
World 456 World, 456
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
# shellcheck source=../shell_config.sh
5+
. "$CURDIR"/../shell_config.sh
6+
7+
echo -n -e "name,value\nHello,123\nWorld,456" | ${CLICKHOUSE_LOCAL} --input-format CSVWithNames --input_format_csv_allow_variable_number_of_columns 1 --structure "name String, value UInt32, test String DEFAULT name || ', ' || value" --output-format TSV --copy
8+
echo -n -e "name,value,test\nHello,123,x\nWorld,456" | ${CLICKHOUSE_LOCAL} --input-format CSVWithNames --input_format_csv_allow_variable_number_of_columns 1 --structure "name String, value UInt32, test String DEFAULT name || ', ' || value" --output-format TSV --copy

0 commit comments

Comments
 (0)