Skip to content

Unexpected end of stream when column is empty. #6611

@dgrr

Description

@dgrr

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.

Metadata

Metadata

Assignees

Labels

comp-formatsInput/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).questionQuestion?

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions