You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "LindaSummer (via GitHub)" <gi...@apache.org> on 2024/08/08 13:50:20 UTC
[PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
LindaSummer opened a new pull request, #4448:
URL: https://github.com/apache/gravitino/pull/4448
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "LindaSummer (via GitHub)" <gi...@apache.org>.
LindaSummer commented on code in PR #4448:
URL: https://github.com/apache/gravitino/pull/4448#discussion_r1711363452
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoMetalake.java:
##########
@@ -843,6 +844,20 @@ public GravitinoMetalake build() {
}
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (!(o instanceof GravitinoMetalake)) {
+ return false;
+ }
+
+ GravitinoMetalake that = (GravitinoMetalake) o;
+ return super.equals(that) && Objects.equal(restClient, that.restClient);
Review Comment:
Hi @jerryshao ,
Thanks for your suggestions!
I will remove the `restClient` comparison.
Best Regards,
Edward
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #4448:
URL: https://github.com/apache/gravitino/pull/4448#issuecomment-2277005982
There are some code formatting issues here. You'll need to run `./gradlew :clients:client-java:spotlessApply` to correct and commit the changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "LindaSummer (via GitHub)" <gi...@apache.org>.
LindaSummer commented on PR #4448:
URL: https://github.com/apache/gravitino/pull/4448#issuecomment-2277076565
> 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao closed pull request #4448: [#1903] feat(clients): add equals for `GravitinoMetalake`.
URL: https://github.com/apache/gravitino/pull/4448
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #4448:
URL: https://github.com/apache/gravitino/pull/4448#discussion_r1710916044
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoMetalake.java:
##########
@@ -843,6 +844,20 @@ public GravitinoMetalake build() {
}
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (!(o instanceof GravitinoMetalake)) {
+ return false;
+ }
+
+ GravitinoMetalake that = (GravitinoMetalake) o;
+ return super.equals(that) && Objects.equal(restClient, that.restClient);
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #4448:
URL: https://github.com/apache/gravitino/pull/4448#issuecomment-2283725608
Thanks @LindaSummer for your contribution, merging to main and branch-0.6.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#1903] feat(clients): add equals for `GravitinoMetalake`. [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao merged PR #4448:
URL: https://github.com/apache/gravitino/pull/4448
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org