mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #40746 from Avogar/fix-csv-schema-inference
Fix possible error Attempt to read after eof in CSV schema inference
This commit is contained in:
commit
b7ea529307
@ -636,8 +636,9 @@ concept WithResize = requires (T value)
|
||||
template <typename Vector>
|
||||
void readCSVStringInto(Vector & s, ReadBuffer & buf, const FormatSettings::CSV & settings)
|
||||
{
|
||||
/// Empty string
|
||||
if (buf.eof())
|
||||
throwReadAfterEOF();
|
||||
return;
|
||||
|
||||
const char delimiter = settings.delimiter;
|
||||
const char maybe_quote = *buf.position();
|
||||
|
@ -0,0 +1,8 @@
|
||||
c1 Nullable(String)
|
||||
c2 Nullable(String)
|
||||
c3 Nullable(String)
|
||||
c4 Nullable(String)
|
||||
c1 Nullable(Int64)
|
||||
c2 Nullable(String)
|
||||
c3 Nullable(String)
|
||||
c4 Nullable(String)
|
@ -0,0 +1,2 @@
|
||||
desc format(CSV, ',,,');
|
||||
desc format(CSV, '123,,abv,')
|
Loading…
Reference in New Issue
Block a user