Skip to content

Commit 8bde797

Browse files
al13n321mkmkme
authored andcommitted
Merge pull request ClickHouse#87258 from ClickHouse/pq0
Fix 'Invalid dict indices bit width: 0' in parquet reader v3
1 parent dba4ab3 commit 8bde797

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Processors/Formats/Impl/Parquet/Decoding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct BitPackedRLEDecoder : public PageDecoder
4141
requireRemainingBytes(1);
4242
bit_width = size_t(UInt8(*data));
4343
data += 1;
44-
if (bit_width > 8 * sizeof(T) || (bit_width == 0 && limit > 1))
44+
if (bit_width > 8 * sizeof(T))
4545
throw Exception(ErrorCodes::INCORRECT_DATA, "Invalid dict indices bit width: {}", bit_width);
4646
}
4747
else
@@ -120,7 +120,7 @@ struct BitPackedRLEDecoder : public PageDecoder
120120
{
121121
if (bit_width == 0)
122122
{
123-
/// bit_width == 0 can be used for dictionary indices if the dictionary has only one value.
123+
/// bit_width == 0 means all values are 0.
124124
if constexpr (!skip)
125125
memset(out, 0, num_values * sizeof(T));
126126
return;

0 commit comments

Comments
 (0)