Skip to content

Conversation

@peanut-chenzhong
Copy link
Contributor

@peanut-chenzhong peanut-chenzhong commented Oct 8, 2021

[HUDI-2509] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

[HUDI-2513] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column
@hudi-bot
Copy link
Collaborator

hudi-bot commented Oct 8, 2021

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run travis re-run the last Travis build
  • @hudi-bot run azure re-run the last Azure build

Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

@peanut-chenzhong Thanks for the fix! Can you add a functional test case to cover this scenario?
Also, some tests in the TestCOWDataSource failed. Please check if they are related to this diff.

@vinothchandar vinothchandar self-assigned this Oct 15, 2021
@xushiyan xushiyan changed the title [HUDI-2513] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column [HUDI-2509] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column Oct 19, 2021
@xushiyan
Copy link
Member

@peanut-chenzhong can you rebase master please? the Azure CI failure probably due to a failing master commit.

@nsivabalan nsivabalan added the priority:blocker Production down; release blocker label Oct 22, 2021
@peanut-chenzhong
Copy link
Contributor Author

@xushiyan PR rebased and added UT for this scenario

@peanut-chenzhong
Copy link
Contributor Author

@hudi-bot run azure

@nsivabalan
Copy link
Contributor

@peanut-chenzhong : I see even without the fix, the added test succeeds. Objects.equals(value, defaultValue) returns true even for null, null. Can you check if the fix is actually required.

…en upsert data with some null value column #3761

[HUDI-2509] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column #3761
@peanut-chenzhong
Copy link
Contributor Author

peanut-chenzhong commented Nov 2, 2021

@peanut-chenzhong : I see even without the fix, the added test succeeds. Objects.equals(value, defaultValue) returns true even for null, null. Can you check if the fix is actually required.

@nsivabalan modified the UT, this fix is necessary cause the default value will be changed to JsonProperty.
you can refer to this issue: #3735

Copy link
Member

@codope codope left a comment

Choose a reason for hiding this comment

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

@peanut-chenzhong
One checkstyle violation. Can ou please fix it?

assertEquals(payload1.combineAndGetUpdateValue(delRecord1, schema).get(), record2);
assertFalse(payload2.combineAndGetUpdateValue(record1, schema).isPresent());
}
@Test
Copy link
Member

Choose a reason for hiding this comment

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

There is a checkstyle violation. Please add an empty line separator between methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@codope done

…en upsert data with some null value column #3761

[HUDI-2509] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column #3761
@nsivabalan nsivabalan merged commit f2fb1aa into apache:master Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:blocker Production down; release blocker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUPPORT] OverwriteNonDefaultsWithLatestAvroPayload doesn`t work when upsert data with some null value column

6 participants