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-6072] Fix NPE when upsert merger and null map or array #8432

Merged
merged 7 commits into from
Apr 28, 2023

Conversation

parisni
Copy link
Contributor

@parisni parisni commented Apr 11, 2023

Change Logs

Fixes #8431

Impact

Describe any public API or user-facing feature change or any performance impact.

Risk level (write none, low medium or high below)

none

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@danny0405 danny0405 changed the title Fix NPE when upsert merger and null map or array [HUDI-6072] Fix NPE when upsert merger and null map or array Apr 13, 2023
@parisni
Copy link
Contributor Author

parisni commented Apr 13, 2023 via email

@danny0405
Copy link
Contributor

Tests based on the spark datasource api (similar to the eg in the OP) or do you have a better idea?

Either data sorurce api or sql should be fine.

@parisni
Copy link
Contributor Author

parisni commented Apr 25, 2023

@danny0405 added stuff for tests, bug cannot setup intellij to debug/run tests locally (pain following the https://hudi.apache.org/contribute/developer-setup)

@danny0405
Copy link
Contributor

@danny0405 added stuff for tests, bug cannot setup intellij to debug/run tests locally (pain following the https://hudi.apache.org/contribute/developer-setup)

Could we fix line 191 instead, that could fix all the data type with null values, covering also the atomic data types.

You can also use the mvn test cmd for testing.

@danny0405 danny0405 self-assigned this Apr 25, 2023
@vinothchandar vinothchandar added priority:critical production down; pipelines stalled; Need help asap. release-0.14.0 labels Apr 25, 2023
@danny0405
Copy link
Contributor

Thanks for the fix, I have reviewed and created a patch:
6072.patch.zip
You can rebase with the latest master, apply the patch and then force-push with the branch.

Co-authored-by: Danny Chan <yuzhao.cyz@gmail.com>
@danny0405
Copy link
Contributor

@hudi-bot run azure

@parisni
Copy link
Contributor Author

parisni commented Apr 27, 2023

@danny0405 integrated your patch. Now I need to:

  • confirm the test breaks without the change
  • assert not throw npe

@danny0405
Copy link
Contributor

@danny0405 integrated your patch. Now I need to:

  • confirm the test breaks without the change
  • assert not throw npe

Yeah, that makes sense, I run the 2 tests locally and they can pass.

also make sure the exception is raised when the fix is not applied
@parisni
Copy link
Contributor Author

parisni commented Apr 27, 2023

@danny0405 added a commit to apply the exact same context as the issue. The previous tests did not fail w/o the patch.

Copy link
Contributor

@danny0405 danny0405 left a comment

Choose a reason for hiding this comment

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

+1

@hudi-bot
Copy link

CI report:

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

@danny0405 danny0405 merged commit 9f8d4d0 into apache:master Apr 28, 2023
16 of 17 checks passed
yihua pushed a commit to yihua/hudi that referenced this pull request May 15, 2023
yihua pushed a commit to yihua/hudi that referenced this pull request May 15, 2023
yihua pushed a commit to yihua/hudi that referenced this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:critical production down; pipelines stalled; Need help asap. release-0.14.0 schema-and-data-types spark Issues related to spark spark-sql
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[SUPPORT] NPE with MapType and new hudi merger
4 participants