xiaotianzhang01 commented on a change in pull request #3728:
URL: https://github.com/apache/iceberg/pull/3728#discussion_r781712277



##########
File path: 
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/SparkTestBase.java
##########
@@ -157,7 +157,11 @@ private void assertEquals(String context, Object[] 
expectedRow, Object[] actualR
       Object actualValue = actualRow[col];
       if (expectedValue != null && expectedValue.getClass().isArray()) {
         String newContext = String.format("%s (nested col %d)", context, col + 
1);
-        assertEquals(newContext, (Object[]) expectedValue, (Object[]) 
actualValue);
+        if (expectedValue instanceof byte[]) {
+          Assert.assertArrayEquals(newContext, (byte[]) expectedValue, 
(byte[]) actualValue);
+        } else {
+          assertEquals(newContext, (Object[]) expectedValue, (Object[]) 
actualValue);

Review comment:
       The SQL query returns `byte[]` instead of `Byte[]`. The encapsulated 
type `Byte[]` can be converted to `Object[]`, but the conversion of the basic 
type `byte[]` will report an error, `[B cannot be cast to [Ljava.lang.Object`;




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