mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
done
This commit is contained in:
parent
3f3f928c1f
commit
7a23d8292f
@ -201,7 +201,10 @@ void CSVRowInputFormat::readPrefix()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
skipRow(in, format_settings.csv, num_columns);
|
skipRow(in, format_settings.csv, num_columns);
|
||||||
|
setupAllColumnsByTableSchema();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!column_mapping->is_set)
|
else if (!column_mapping->is_set)
|
||||||
setupAllColumnsByTableSchema();
|
setupAllColumnsByTableSchema();
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
testdata1
|
||||||
|
testdata2
|
15
tests/queries/0_stateless/01818_input_format_with_names_use_header.sh
Executable file
15
tests/queries/0_stateless/01818_input_format_with_names_use_header.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
# shellcheck source=../shell_config.sh
|
||||||
|
. "$CUR_DIR"/../shell_config.sh
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} -q "DROP TABLE IF EXISTS 01818_with_names;"
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} -q "CREATE TABLE 01818_with_names (t String) ENGINE = MergeTree ORDER BY t;"
|
||||||
|
|
||||||
|
echo -ne "t\ntestdata1\ntestdata2" | ${CLICKHOUSE_CLIENT_BINARY} --input_format_with_names_use_header 0 --query "INSERT INTO 01818_with_names FORMAT CSVWithNames"
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} -q "SELECT * FROM 01818_with_names;"
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT_BINARY} -q "DROP TABLE IF EXISTS 01818_with_names;"
|
Loading…
Reference in New Issue
Block a user