Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/19222#discussion_r179335019
--- Diff:
common/unsafe/src/test/java/org/apache/spark/unsafe/types/UTF8StringSuite.java
---
@@ -515,7 +518,8 @@ public void writeToOutputStreamUnderflow() throws
IOException {
final byte[] test = "01234567".getBytes(StandardCharsets.UTF_8);
for (int i = 1; i <= Platform.BYTE_ARRAY_OFFSET; ++i) {
- UTF8String.fromAddress(test, Platform.BYTE_ARRAY_OFFSET - i,
test.length + i)
+ new UTF8String(
+ new ByteArrayMemoryBlock(test, Platform.BYTE_ARRAY_OFFSET - i,
test.length + i))
--- End diff --
This change follows the original behavior for the backward compatibility.
If we want to change the behavior, update test, or delete this, it would be
good to address in another PR. Is it better to discuss this UT in another PR?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]