ulysses-you commented on a change in pull request #34267:
URL: https://github.com/apache/spark/pull/34267#discussion_r730244554
##########
File path:
common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java
##########
@@ -42,15 +45,34 @@ public static void writeToMemory(byte[] src, Object target,
long targetOffset) {
public static long getPrefix(byte[] bytes) {
if (bytes == null) {
return 0L;
+ }
+ return getPrefix(bytes, Platform.BYTE_ARRAY_OFFSET, bytes.length);
+ }
+
+ protected static long getPrefix(Object base, long offset, int numBytes) {
Review comment:
removed it if you preferred
--
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]