nastra commented on code in PR #14081:
URL: https://github.com/apache/iceberg/pull/14081#discussion_r2364011229


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/SparkTestHelperBase.java:
##########
@@ -79,6 +80,12 @@ protected void assertEquals(String context, Object[] 
expectedRow, Object[] actua
         } else {
           assertEquals(newContext, (Object[]) expectedValue, (Object[]) 
actualValue);
         }
+      } else if (expectedValue instanceof VariantVal && actualValue instanceof 
VariantVal) {
+        // Spark VariantVal comparison is based on raw byte[] comparison, 
which can fail
+        // if Spark uses trailing null bytes. so, we compare their JSON 
representation instead.
+        assertThat((actualValue).toString())

Review Comment:
   ```suggestion
           assertThat(actualValue).asString()
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to