Skip to content

Commit

Permalink
Fix string null entry in CheckpointEntryIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed May 27, 2022
1 parent a37828b commit 429464c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,12 @@ private DeltaLakeTransactionLogEntry buildTxnEntry(ConnectorSession session, Blo
return DeltaLakeTransactionLogEntry.transactionEntry(result);
}

@Nullable
private String getString(Block block, int position)
{
if (block.isNull(position)) {
return null;
}
return block.getSlice(position, 0, block.getSliceLength(position)).toString(UTF_8);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public void testReadMetadataEntry()
.isEqualTo(
new MetadataEntry(
"b6aeffad-da73-4dde-b68e-937e468b1fde",
"",
"",
null,
null,
new MetadataEntry.Format("parquet", Map.of()),
"{\"type\":\"struct\",\"fields\":[" +
"{\"name\":\"name\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}}," +
Expand Down

0 comments on commit 429464c

Please sign in to comment.