Skip to content

Commit

Permalink
Issue #82: Fix typos during row_group reset
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur committed May 30, 2024
1 parent f586754 commit 4200979
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ class DefaultParquetReader : public ParquetReader
* row_group cannot be less than zero at this point so it is safe to cast
* it to unsigned int
*/
Assert(this->row_group >= 0);
if ((uint) this->row_group >= this->rowgroups.size())
return false;

Expand Down Expand Up @@ -1024,7 +1025,7 @@ class DefaultParquetReader : public ParquetReader

void rescan(void)
{
this->row_group = 0;
this->row_group = -1;
this->row = 0;
this->num_rows = 0;
}
Expand Down Expand Up @@ -1111,6 +1112,7 @@ class CachingParquetReader : public ParquetReader
* row_group cannot be less than zero at this point so it is safe to cast
* it to unsigned int
*/
Assert(this->row_group >= 0);
if ((uint) this->row_group >= this->rowgroups.size())
return false;

Expand Down Expand Up @@ -1376,7 +1378,7 @@ class CachingParquetReader : public ParquetReader

void rescan(void)
{
this->row_group = 0;
this->row_group = -1;
this->row = 0;
this->num_rows = 0;
}
Expand Down

0 comments on commit 4200979

Please sign in to comment.