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

[MINOR] Reuse empty InternalSchema instance #7287

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

trushev
Copy link
Contributor

@trushev trushev commented Nov 23, 2022

Change Logs

When schema evolution is disabled each instance of HoodieAvroDataBlock calls getEmptyInternalSchema() which triggers creation of ArrayList and InternalSchema. We can easily avoid unnecessary object creation by reusing empty schema.

Impact

Avoid unnecessary creation of empty InternalSchema

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

Low

Documentation Update

None

Contributor's checklist

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

@codope codope added schema-and-data-types priority:minor everything else; usability gaps; questions; feature reqs labels Nov 29, 2022
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.

@trushev Change looks good. Thanks for the contribution. Can you please rebase?

@trushev
Copy link
Contributor Author

trushev commented Nov 29, 2022

@codope thanks, it's rebased

@hudi-bot
Copy link

CI report:

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

@codope codope merged commit 2cdaa60 into apache:master Nov 30, 2022
vamshigv pushed a commit to vamshigv/hudi that referenced this pull request Dec 1, 2022
fengjian428 pushed a commit to fengjian428/hudi that referenced this pull request Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:minor everything else; usability gaps; questions; feature reqs schema-and-data-types
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants