MaxGekk commented on code in PR #49812: URL: https://github.com/apache/spark/pull/49812#discussion_r1943671738
########## sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapBuilderSuite.scala: ########## @@ -143,12 +145,15 @@ class ArrayBasedMapBuilderSuite extends SparkFunSuite with SQLHelper { val builder = new ArrayBasedMapBuilder(new StructType().add("i", "int"), IntegerType) builder.put(InternalRow(1), 1) builder.put(InternalRow(2), 2) + // The UnsafeRow.toString() method output is based on the underlying bytes and is + // endian dependent. + val keyAsString = if (nativeOrder().equals(BIG_ENDIAN)) "[0,100000000]" else "[0,1]" // By default duplicated map key fails the query. checkError( exception = intercept[SparkRuntimeException](builder.put(unsafeRow, 3)), condition = "DUPLICATED_MAP_KEY", parameters = Map( - "key" -> "[0,1]", + "key" -> keyAsString, Review Comment: Can't you just replace `[0,1]` by `unsafeRow.toString`? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org