Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Fixed reading parquet of dict-encoded, plain data pages (fallback) #367

Merged
merged 1 commit into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/io/parquet/read/binary/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ fn extend_from_page<O: Offset>(
values,
validity,
),
(Encoding::Plain, None, true) => read_plain_optional::<O>(
(Encoding::Plain, _, true) => read_plain_optional::<O>(
validity_buffer,
values_buffer,
page.num_values(),
offsets,
values,
validity,
),
(Encoding::Plain, None, false) => {
(Encoding::Plain, _, false) => {
read_plain_required::<O>(page.buffer(), page.num_values(), offsets, values)
}
_ => {
Expand Down
6 changes: 4 additions & 2 deletions src/io/parquet/read/fixed_size_binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,17 @@ pub(crate) fn extend_from_page(
values,
validity,
),
(Encoding::Plain, None, true) => read_optional(
(Encoding::Plain, _, true) => read_optional(
validity_buffer,
values_buffer,
page.num_values() as u32,
size,
values,
validity,
),
(Encoding::Plain, None, false) => {
// it can happen that there is a dictionary but the encoding is plain because
// it falled back.
(Encoding::Plain, _, false) => {
read_required(page.buffer(), page.num_values() as u32, size, values)
}
_ => {
Expand Down
6 changes: 4 additions & 2 deletions src/io/parquet/read/primitive/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,17 @@ where
op,
)
}
(Encoding::Plain, None, true) => read_nullable(
// it can happen that there is a dictionary but the encoding is plain because
// it falled back.
(Encoding::Plain, _, true) => read_nullable(
validity_buffer,
values_buffer,
additional,
values,
validity,
op,
),
(Encoding::Plain, None, false) => read_required(page.buffer(), additional, values, op),
(Encoding::Plain, _, false) => read_required(page.buffer(), additional, values, op),
_ => {
return Err(other_utils::not_implemented(
&page.encoding(),
Expand Down