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
10 changes: 5 additions & 5 deletions cpp/src/io/parquet/page_decode.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -1174,23 +1174,23 @@ inline __device__ bool setup_local_page_info(page_state_s* const s,
// NOTE: s->page.num_rows, s->col.chunk_row, s->first_row and s->num_rows will be
// invalid/bogus during first pass of the preprocess step for nested types. this is ok
// because we ignore these values in that stage.
auto const max_row = min_row + num_rows;
auto const end_row = min_row + num_rows;

// if we are totally outside the range of the input, do nothing
if ((page_start_row > max_row) || (page_start_row + s->page.num_rows < min_row)) {
auto const page_end_row = page_start_row + s->page.num_rows;
if ((page_start_row >= end_row) || (page_end_row <= min_row)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only real change: adding = on the comparisons

s->first_row = 0;
s->num_rows = 0;
}
// otherwise
else {
s->first_row = page_start_row >= min_row ? 0 : min_row - page_start_row;
auto const max_page_rows = s->page.num_rows - s->first_row;
s->num_rows = (page_start_row + s->first_row) + max_page_rows <= max_row
s->num_rows = (page_start_row + s->first_row) + max_page_rows <= end_row
? max_page_rows
: max_row - (page_start_row + s->first_row);
: end_row - (page_start_row + s->first_row);
}
}

__syncthreads();

// zero counts
Expand Down