Skip to content

Commit

Permalink
Implement mayHaveNull() for Dictionary, RLE, and GroupById Blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pettyjamesm authored and martint committed Jul 7, 2021
1 parent 17cf25f commit bc1d5ba
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ public Block getSingleValueBlock(int position)
return block.getSingleValueBlock(position);
}

@Override
public boolean mayHaveNull()
{
return block.mayHaveNull();
}

@Override
public boolean isNull(int position)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@ public Block copyRegion(int position, int length)
return dictionaryBlock.compact();
}

@Override
public boolean mayHaveNull()
{
return positionCount > 0 && dictionary.mayHaveNull();
}

@Override
public boolean isNull(int position)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ public Block getSingleValueBlock(int position)
return value;
}

@Override
public boolean mayHaveNull()
{
return positionCount > 0 && value.isNull(0);
}

@Override
public boolean isNull(int position)
{
Expand Down

0 comments on commit bc1d5ba

Please sign in to comment.