Skip to content
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

[WIP] Add Manifest Stats in snapshot summary. #13

Closed
wants to merge 55 commits into from
Closed

Conversation

nk1506
Copy link
Owner

@nk1506 nk1506 commented Apr 16, 2024

No description provided.

void addedManifestStats(ManifestFile manifest) {
switch (manifest.content()) {
case DATA:
this.totalDataManifestFiles++;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not increment these in addedManifest method itself? why we need a separate method?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.count();
assertThat(table.currentSnapshot().summary().get(TOTAL_DATA_MANIFEST_FILES))
.isEqualTo(String.valueOf(dataManifestCount));
int deletedManifestCount =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int deletedManifestCount =
int deleteManifestCount =

@@ -275,4 +287,22 @@ private void runAddedDeleteFileSequenceNumberTest(
.as("File sequence number mismatch")
.isEqualTo(expectedSequenceNumber);
}

public static void testManifestStats(Table table) {
List<ManifestFile> manifestFiles = table.currentSnapshot().allManifests(table.io());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is a test case, if we use, currentSnapshot().dataManifests and currentSnapshot().deleteManifests, it can look simpler.

Copy link

@ajantha-bhat ajantha-bhat Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, allManifests is filling the dataManifests and deleteManifests fields if it is null. So, with one IO we can get both the fields.

@@ -201,7 +203,7 @@ public void testBinPackPartitionedTable() {

shouldHaveFiles(table, 4);
List<Object[]> actualRecords = currentData();

testManifestStats(table);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it should be placed before computing actualRecords, check all the places.

Also, keep the new line as before for all the places.

stevenzwu and others added 17 commits August 6, 2024 08:45
also fixed the bug of missing jmh in the 1.19 module.
The angle brackets were without any escapes so docs renderer treated
them as HTML. The resulting text on the website looked like an
unfinished sentence:

    The unified partition type looks like Struct.

Putting the angle brackets in backticks prevent them from being
interpreted as HTML. Surrounding names like spec#0, field#1 are also put
inside backticks for consistence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.