Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enforce delta.checkpoint.writeStatsAsJson and delta.checkpoint.writeStatsAsStruct option in Delta Lake #13331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use ImmutableList.Builder in CheckpointSchemaManager
  • Loading branch information
ebyhr committed Aug 26, 2022
commit 57f8a1ddd9d3701c05127ac04ceffe7cdadde97e
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ public RowType getAddEntryType(MetadataEntry metadataEntry)
RowType.from(allColumns.stream().map(column -> buildNullCountType(Optional.of(column.getPhysicalName()), column.getPhysicalColumnType())).collect(toImmutableList()))));

MapType stringMap = (MapType) typeManager.getType(TypeSignature.mapType(VarcharType.VARCHAR.getTypeSignature(), VarcharType.VARCHAR.getTypeSignature()));
List<RowType.Field> addFields = ImmutableList.of(
RowType.field("path", VarcharType.createUnboundedVarcharType()),
RowType.field("partitionValues", stringMap),
RowType.field("size", BigintType.BIGINT),
RowType.field("modificationTime", BigintType.BIGINT),
RowType.field("dataChange", BooleanType.BOOLEAN),
RowType.field("stats", VarcharType.createUnboundedVarcharType()),
RowType.field("stats_parsed", RowType.from(statsColumns.build())),
RowType.field("tags", stringMap));

return RowType.from(addFields);
ImmutableList.Builder<RowType.Field> addFields = ImmutableList.builder();
addFields.add(RowType.field("path", VarcharType.createUnboundedVarcharType()));
addFields.add(RowType.field("partitionValues", stringMap));
addFields.add(RowType.field("size", BigintType.BIGINT));
addFields.add(RowType.field("modificationTime", BigintType.BIGINT));
addFields.add(RowType.field("dataChange", BooleanType.BOOLEAN));
addFields.add(RowType.field("stats", VarcharType.createUnboundedVarcharType()));
addFields.add(RowType.field("stats_parsed", RowType.from(statsColumns.build())));
addFields.add(RowType.field("tags", stringMap));

return RowType.from(addFields.build());
}

private static RowType.Field buildNullCountType(Optional<String> columnName, Type columnType)
Expand Down