Skip to content

Commit

Permalink
Fix memory error reading FIXED_LEN_BYTE_ARRAY
Browse files Browse the repository at this point in the history
Need a bit more space for the buffer.
  • Loading branch information
gaborcsardi committed Jul 23, 2024
1 parent ab6ce75 commit 1c9b8a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/ParquetFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ class ColumnScan {
// no dict here we use the result set string heap directly
{
// never going to have more string data than this uncompressed_page_size
// (lengths use bytes)
// (lengths use bytes), but for FIXED_LEN_BYTE_ARRAY we need space
// for the terminating \0 bytes as well.
auto string_heap_chunk = std::unique_ptr<char[]>(
new char[page_header.uncompressed_page_size]);
new char[page_header.uncompressed_page_size + dict_size]);
result_col.string_heap_chunks.push_back(std::move(string_heap_chunk));
auto str_ptr =
result_col
Expand Down

0 comments on commit 1c9b8a2

Please sign in to comment.