kbendick commented on code in PR #5137:
URL: https://github.com/apache/iceberg/pull/5137#discussion_r907669447
##########
spark/v2.4/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ArrowVectorAccessorFactory.java:
##########
@@ -78,6 +79,17 @@ public UTF8String ofRow(VarCharVector vector, int rowId) {
public UTF8String ofBytes(byte[] bytes) {
return UTF8String.fromBytes(bytes);
}
+
+ @Override
+ public UTF8String ofByteBuffer(ByteBuffer byteBuffer) {
+ if (byteBuffer.hasArray()) {
+ return UTF8String.fromBytes(
+ byteBuffer.array(), byteBuffer.arrayOffset() +
byteBuffer.position(), byteBuffer.remaining());
Review Comment:
Thanks for letting me know. I’ll see if I can add a checkstyle rule for that
or update one to catch it!
--
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]