Skip to content

[#1903] feat(clients): add equals for GravitinoMetalake.#4448

Merged
jerryshao merged 7 commits intoapache:mainfrom
LindaSummer:feature/add_equal
Aug 12, 2024
Merged

[#1903] feat(clients): add equals for GravitinoMetalake.#4448
jerryshao merged 7 commits intoapache:mainfrom
LindaSummer:feature/add_equal

Conversation

@LindaSummer
Copy link
Member

What changes were proposed in this pull request?

Add equals() and unit tests for GravitinoMetalake.

Why are the changes needed?

As issue mentioned, GravitinoMetalake class should have an equals method.

Fix: #1903

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Unit test cases has been added.

@justinmclean
Copy link
Member

There are some code formatting issues here. You'll need to run ./gradlew :clients:client-java:spotlessApply to correct and commit the changes.

@LindaSummer
Copy link
Member Author

There are some code formatting issues here. You'll need to run ./gradlew :clients:client-java:spotlessApply to correct and commit the changes.

Thanks very much for your suggestions!
I will fix the formatting issues with this command.

Best Regards,
Edward

}

GravitinoMetalake that = (GravitinoMetalake) o;
return super.equals(that) && Objects.equal(restClient, that.restClient);
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like that we don't need to compare the restClient object. If the same metalake is gotten from different clients, I think though restClient is different, the GravitinoMetalake itself should be the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @jerryshao ,

Thanks for your suggestions!
I will remove the restClient comparison.

Best Regards,
Edward

@jerryshao
Copy link
Contributor

Thanks @LindaSummer for your contribution, merging to main and branch-0.6.

@jerryshao jerryshao merged commit 6b555b2 into apache:main Aug 12, 2024
github-actions bot pushed a commit that referenced this pull request Aug 12, 2024
### What changes were proposed in this pull request?

Add `equals()` and unit tests for `GravitinoMetalake`.

### Why are the changes needed?

As issue mentioned, `GravitinoMetalake` class should have an equals
method.

Fix: #1903

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Unit test cases has been added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] in GravitinoMetaLake.java subclass has equals method but parent does not

3 participants