mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
better
This commit is contained in:
parent
6f30fae34e
commit
138b74aa3b
@ -83,7 +83,7 @@ void NativeBlockInputStream::readData(const IDataType & type, IColumn & column,
|
|||||||
type.deserializeBinaryBulkWithMultipleStreams(column, rows, settings, state);
|
type.deserializeBinaryBulkWithMultipleStreams(column, rows, settings, state);
|
||||||
|
|
||||||
if (column.size() != rows)
|
if (column.size() != rows)
|
||||||
throw ParsingException("Cannot read all data in NativeBlockInputStream. Rows read: " + toString(column.size()) + ". Rows expected: " + toString(rows) + ".",
|
throw Exception("Cannot read all data in NativeBlockInputStream. Rows read: " + toString(column.size()) + ". Rows expected: " + toString(rows) + ".",
|
||||||
ErrorCodes::CANNOT_READ_ALL_DATA);
|
ErrorCodes::CANNOT_READ_ALL_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ void DataTypeFixedString::deserializeBinaryBulk(IColumn & column, ReadBuffer & i
|
|||||||
size_t read_bytes = istr.readBig(reinterpret_cast<char *>(&data[initial_size]), max_bytes);
|
size_t read_bytes = istr.readBig(reinterpret_cast<char *>(&data[initial_size]), max_bytes);
|
||||||
|
|
||||||
if (read_bytes % n != 0)
|
if (read_bytes % n != 0)
|
||||||
throw ParsingException("Cannot read all data of type FixedString. Bytes read:" + toString(read_bytes) + ". String size:" + toString(n) + ".",
|
throw Exception("Cannot read all data of type FixedString. Bytes read:" + toString(read_bytes) + ". String size:" + toString(n) + ".",
|
||||||
ErrorCodes::CANNOT_READ_ALL_DATA);
|
ErrorCodes::CANNOT_READ_ALL_DATA);
|
||||||
|
|
||||||
data.resize(initial_size + read_bytes);
|
data.resize(initial_size + read_bytes);
|
||||||
|
@ -165,7 +165,7 @@ public:
|
|||||||
{
|
{
|
||||||
auto read_bytes = read(to, n);
|
auto read_bytes = read(to, n);
|
||||||
if (n != read_bytes)
|
if (n != read_bytes)
|
||||||
throw ParsingException("Cannot read all data. Bytes read: " + std::to_string(read_bytes) + ". Bytes expected: " + std::to_string(n) + ".", ErrorCodes::CANNOT_READ_ALL_DATA);
|
throw Exception("Cannot read all data. Bytes read: " + std::to_string(read_bytes) + ". Bytes expected: " + std::to_string(n) + ".", ErrorCodes::CANNOT_READ_ALL_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A method that can be more efficiently implemented in derived classes, in the case of reading large enough blocks.
|
/** A method that can be more efficiently implemented in derived classes, in the case of reading large enough blocks.
|
||||||
|
Loading…
Reference in New Issue
Block a user