You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Gabriella Lotz (Code Review)" <ge...@cloudera.org> on 2025/09/15 11:16:50 UTC
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Gabriella Lotz has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23424
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Add equals() and hashCode() methods to PartialRow and PartitionSchema
Implement proper object equality and hash code generation for
PartialRow, HashBucketSchema, and RangeWithHashSchema classes to
enable correct behavior in collections and comparisons.
Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
---
M java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java
M java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
2 files changed, 99 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/23424/1
--
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: newchange
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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 1: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/1803/ : FAILURE
--
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: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Mon, 15 Sep 2025 12:12:03 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23424 )
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Add equals() and hashCode() methods to PartialRow and PartitionSchema
Implement proper object equality and hash code generation for
PartialRow, HashBucketSchema, and RangeWithHashSchema classes to
enable correct behavior in collections and comparisons.
Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Reviewed-on: http://gerrit.cloudera.org:8080/23424
Reviewed-by: Marton Greber <gr...@gmail.com>
Tested-by: Marton Greber <gr...@gmail.com>
Reviewed-by: Zoltan Martonka <zm...@cloudera.com>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java
M java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java
4 files changed, 255 insertions(+), 0 deletions(-)
Approvals:
Marton Greber: Looks good to me, approved; Verified
Zoltan Martonka: Looks good to me, but someone else must approve
--
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: merged
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 5
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/23424
to look at the new patch set (#3).
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Add equals() and hashCode() methods to PartialRow and PartitionSchema
Implement proper object equality and hash code generation for
PartialRow, HashBucketSchema, and RangeWithHashSchema classes to
enable correct behavior in collections and comparisons.
Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
---
M java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java
M java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java
4 files changed, 282 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/23424/3
--
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: newpatchset
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
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 4: Verified+1 Code-Review+2
unrelated test failures:
debug: master_authz-itest.4
asan: partition_pruner-test.0
tsan: org.apache.kudu.client.TestKuduClient
--
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: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Mon, 22 Sep 2025 10:26:05 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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 2: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/1814/ : FAILURE
--
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: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 09:33:49 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/23424
to look at the new patch set (#4).
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Add equals() and hashCode() methods to PartialRow and PartitionSchema
Implement proper object equality and hash code generation for
PartialRow, HashBucketSchema, and RangeWithHashSchema classes to
enable correct behavior in collections and comparisons.
Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
---
M java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java
M java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java
4 files changed, 255 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/23424/4
--
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: newpatchset
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina 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 1:
Do you think a unit is also required to be added to test the newly added methods?
--
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: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Tue, 16 Sep 2025 10:01:43 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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 4:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/1821/
--
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: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 12:15:04 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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: Verified+1
Build Successful
http://jenkins.kudu.apache.org/job/pre_commit/1815/ : SUCCESS
--
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 <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 13:15:40 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
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+2
Thanks for making this change!
--
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 <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 14:11:21 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has removed a vote on this change.
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
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: deleteVote
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/23424
to look at the new patch set (#2).
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Add equals() and hashCode() methods to PartialRow and PartitionSchema
Implement proper object equality and hash code generation for
PartialRow, HashBucketSchema, and RangeWithHashSchema classes to
enable correct behavior in collections and comparisons.
Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
---
M java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java
M java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java
4 files changed, 240 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/24/23424/2
--
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: newpatchset
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
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 2:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java:
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java@634
PS2, Line 634: @Test
: public void testEquals() {
nit: at the very end could you also add a 'happy' case where we assert true?
eg row1 == row1
and row4 = getSchemaWithAllTypes then row1 == row4?
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java@659
PS2, Line 659: @Test
: public void testHashCode() {
nit: here can you add some negative cases, where we are not expecting hashes to be the same?
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java:
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java@40
PS2, Line 40: public void testHashBucketSchemaEquals() {
: PartitionSchema.HashBucketSchema schema1 = new PartitionSchema.HashBucketSchema(
: Arrays.asList(1, 2), 16, 42);
: PartitionSchema.HashBucketSchema schema2 = new PartitionSchema.HashBucketSchema(
: Arrays.asList(1, 2), 16, 42);
:
: assertEquals(schema1, schema2);
: assertEquals(schema1.hashCode(), schema2.hashCode());
: }
nit: can you please add some negative cases as well?
--
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: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 12:04:37 +0000
Gerrit-HasComments: Yes
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
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 1: Verified+1 Code-Review+2
unrelated test failure:
release: org.apache.kudu.spark.kudu.DefaultSourceTest
--
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: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Tue, 16 Sep 2025 08:20:55 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz 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:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java:
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java@634
PS2, Line 634: @Test
: public void testEquals() {
> nit: at the very end could you also add a 'happy' case where we assert true
Done
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartialRow.java@659
PS2, Line 659: assertTrue(row1.equals(row1));
:
> nit: here can you add some negative cases, where we are not expecting hashe
Done
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java:
http://gerrit.cloudera.org:8080/#/c/23424/2/java/kudu-client/src/test/java/org/apache/kudu/client/TestPartitionSchemaClasses.java@40
PS2, Line 40: public void testHashBucketSchemaEquals() {
: PartitionSchema.HashBucketSchema schema1 = new PartitionSchema.HashBucketSchema(
: Arrays.asList(1, 2), 16, 42);
: PartitionSchema.HashBucketSchema schema2 = new PartitionSchema.HashBucketSchema(
: Arrays.asList(1, 2), 16, 42);
:
: assertEquals(schema1, schema2);
: assertEquals(schema1.hashCode(), schema2.hashCode());
:
> nit: can you please add some negative cases as well?
Done
--
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 <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 12:16:27 +0000
Gerrit-HasComments: Yes
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
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 <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 10:58:08 +0000
Gerrit-HasComments: Yes
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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 4: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/1821/ : FAILURE
--
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: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 13:29:38 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/1803/
--
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: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 15 Sep 2025 11:17:01 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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 2:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/1814/
--
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: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 08:03:54 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins 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:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/1815/
--
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 <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 12:16:24 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina 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
(1 comment)
Overall looks good to me!
Just a nitpick.
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 check those conditions (I am guessing number of such conditions would be less) and return true. Return false for rest of it. That way, the logic becomes simpler in terms of readability.
--
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 <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 19 Sep 2025 10:37:17 +0000
Gerrit-HasComments: Yes
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz 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 1:
> Patch Set 1:
>
> Do you think a unit is also required to be added to test the newly added methods?
Yes, it would be a good idea, so I added some tests to the functions.
--
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: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 18 Sep 2025 08:05:33 +0000
Gerrit-HasComments: No
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has removed a vote on this change.
Change subject: Add equals() and hashCode() methods to PartialRow and PartitionSchema
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
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: deleteVote
Gerrit-Change-Id: Iea7d547397c37506c7d0baf4f66aa6b34a99f10e
Gerrit-Change-Number: 23424
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] Add equals() and hashCode() methods to PartialRow and PartitionSchema
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka 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 4: Code-Review+1
Very nice using the same prime as java.
--
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: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 22 Sep 2025 12:33:30 +0000
Gerrit-HasComments: No