Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ deserializeFieldFromBinaryRepr(const std::string & str, DataTypePtr expected_typ
if (non_nullable_type->getTypeId() == TypeIndex::Variant)
return std::nullopt;

/// `insertData` of a fixed-size column ignores the length and reads the width of the type, so a
/// shorter bound would read past the buffer. Iceberg keeps the bound as written, which for a
/// promoted column (`int` -> `long`) is narrower than the column is now.
if (non_nullable_type->haveMaximumSizeOfValue() && str.size() < non_nullable_type->getSizeOfValueInMemory())
return std::nullopt;

/// For all other types except decimal binary representation
/// matches our internal representation
column->insertData(str.data(), str.length());
Expand Down
Loading