dimas-b commented on code in PR #4537:
URL: https://github.com/apache/polaris/pull/4537#discussion_r3306116284
##########
polaris-core/src/test/java/org/apache/polaris/core/storage/gcp/GcpCredentialsStorageIntegrationTest.java:
##########
@@ -400,13 +400,23 @@ public void
testGenerateAccessBoundaryPreservesLiteralQuestionMarksInPath() {
/**
* Custom comparator as ObjectNodes are compared by field indexes as opposed
to field names. They
- * also don't equate a field that is present and set to null with a field
that is omitted
- *
- * @param on1
- * @param on2
- * @return
+ * also don't equate a field that is present and set to null with a field
that is omitted. Array
+ * nodes are compared element-by-element in order — without this, {@code
fieldNames()} returns
+ * empty for arrays and the loop below would short-circuit to {@code true},
hiding mismatches in
+ * array contents.
*/
private boolean recursiveEquals(ContainerNode<?> on1, ContainerNode<?> on2) {
+ if (on1.isArray() || on2.isArray()) {
Review Comment:
Good point. The only reason for custom comparison is handling `null` values,
but they do not actually occur in these tests.... updating
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]