-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Unexpected end of stream when column is empty. #6611
Copy link
Copy link
Closed
Labels
comp-formatsInput/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).Input/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).questionQuestion?Question?
Description
Hello,
My ClickHouse version is:
SELECT version()
┌─version()─┐
│ 19.11.2.7 │
└───────────┘
I don't know if the problem will have a specific fix. The error is caused because the last field isn't filled (it's nullable), but ClickHouse server returns an error of unexpected end of stream.
You can try by using:
CREATE TABLE xx
(
`id` Int64,
`name` Nullable(String),
`price` Nullable(Float)
)
ENGINE = Memory
echo -en "1\ta\t0.1\n2\tb\t" | ch -q 'insert into xx format TSV'
The error will be Code: 33. DB::Exception: Unexpected end of stream, while parsing value of Nullable type: (at row 2) because the last field is empty. If echo -en "1\ta\t0.1\n2\tb\t\n" | ch -q 'insert into xx format TSV' is executed the query works. But that not the point here.
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-formatsInput/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).Input/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).questionQuestion?Question?