Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoramirez committed Oct 25, 2024
1 parent 585a349 commit 13bf442
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,12 @@ public Boolean readFieldBoolean(int ordinal, String field) {
}

public Boolean readFieldBoolean(Offset offset) {
offset.increment(1);
if (VarInt.readVNull(record.data, offset.get())) {
offset.increment(1);
return null;
}
int value = record.data.get(offset.get());
offset.increment(1);
return value == 1 ? Boolean.TRUE : Boolean.FALSE;
}

Expand Down Expand Up @@ -272,8 +273,8 @@ public float readFieldFloat(int ordinal, String field) {
}

public float readFieldFloat(Offset offset) {
offset.increment(4);
int value = record.data.readIntBits(offset.get());
offset.increment(4);
if (value == HollowObjectWriteRecord.NULL_FLOAT_BITS) {
return Float.NaN;
}
Expand All @@ -295,8 +296,8 @@ public double readFieldDouble(int ordinal, String field) {
}

public double readFieldDouble(Offset offset) {
offset.increment(8);
long value = record.data.readLongBits(offset.get());
offset.increment(8);
if (value == HollowObjectWriteRecord.NULL_DOUBLE_BITS) {
return Double.NaN;
}
Expand Down

0 comments on commit 13bf442

Please sign in to comment.