Skip to content

Commit

Permalink
Add a doc comment and error message in ParquetPageSource
Browse files Browse the repository at this point in the history
  • Loading branch information
jirassimok authored and findepi committed Apr 9, 2021
1 parent 5f3381f commit 1f3955a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ public void close()
private final class ParquetBlockLoader
implements LazyBlockLoader
{
/**
* Stores batch ID at instantiation time. Loading fails if the ID
* changes before {@link #load()} is called.
*/
private final int expectedBatchId = batchId;
private final Field field;
private boolean loaded;
Expand All @@ -155,7 +159,7 @@ public ParquetBlockLoader(Field field)
public final Block load()
{
checkState(!loaded, "Already loaded");
checkState(batchId == expectedBatchId);
checkState(batchId == expectedBatchId, "Inconsistent state; wrong batch");

Block block;
String parquetDataSourceId = parquetReader.getDataSource().getId().toString();
Expand Down

0 comments on commit 1f3955a

Please sign in to comment.