Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/23424 )
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema ...................................................................... Patch Set 3: -Code-Review (1 comment) http://gerrit.cloudera.org:8080/#/c/23424/3/java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java File java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java: http://gerrit.cloudera.org:8080/#/c/23424/3/java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java@1972 PS3, Line 1972: return true > nit: If we know what is required for two objects to be equal, we could just yes that is true. i was under the impression that Schema is harder to compare. But just checked that schema has equals implemented properly, meaning it has column wise comparison: for (int i = 0; i < this.getColumns().size(); i++) { if (!this.getColumnByIndex(i).equals(that.getColumnByIndex(i))) { return false; } } Bottom line we dont need the for loop, and then we can just use simplified logic as Ashwani suggested, and like we do in other places. -- To view, visit http://gerrit.cloudera.org:8080/23424 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e Gerrit-Change-Number: 23424 Gerrit-PatchSet: 3 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Comment-Date: Fri, 19 Sep 2025 10:58:08 +0000 Gerrit-HasComments: Yes
