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

[HUDI-5087] Fix incorrect merging sequence for Column Stats Record in HoodieMetadataPayload #7053

Merged
merged 4 commits into from
Oct 26, 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
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ private static HoodieMetadataColumnStats mergeColumnStatsRecords(HoodieMetadataC

Comparable maxValue =
(Comparable) Stream.of(
(Comparable) unwrapStatisticValueWrapper(prevColumnStats.getMinValue()),
(Comparable) unwrapStatisticValueWrapper(newColumnStats.getMinValue()))
(Comparable) unwrapStatisticValueWrapper(prevColumnStats.getMaxValue()),
(Comparable) unwrapStatisticValueWrapper(newColumnStats.getMaxValue()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch, is there any possibility we write a unit test for this clazz ?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor

Choose a reason for hiding this comment

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

Added the tests

.filter(Objects::nonNull)
.max(Comparator.naturalOrder())
.orElse(null);
Expand Down