Skip to content

Commit

Permalink
Merge pull request apache#7 from shangxinli/encr_commit_50a29d0
Browse files Browse the repository at this point in the history
Fix bug: Optional field in RowGroup is treated as always showing up
  • Loading branch information
ggershinsky committed May 3, 2019
2 parents 35a8c8a + 89e5478 commit e557b86
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ public BlockMetaData() {

// Reader side (get parameters from RowGroup structure)
public BlockMetaData(long fileOffset, long totalCompressedSize) {
this.startingPosition = fileOffset;
startingPositionSet = true;
this.totalCompressedSize = totalCompressedSize;
totalCompressedSizeSet = true;
// fileOffset is optional, 0 means fileOffset is absent
if (fileOffset > 0) {
this.startingPosition = fileOffset;
startingPositionSet = true;
}

// totalCompressedSize is optional, 0 means totalCompressedSize is absent
if (totalCompressedSize > 0) {
this.totalCompressedSize = totalCompressedSize;
totalCompressedSizeSet = true;
}
}


Expand Down

0 comments on commit e557b86

Please sign in to comment.