RussellSpitzer commented on code in PR #15634:
URL: https://github.com/apache/iceberg/pull/15634#discussion_r3112615075
##########
core/src/main/java/org/apache/iceberg/BaseFile.java:
##########
@@ -581,9 +584,33 @@ private static <K, V> Map<K, V> copyMap(Map<K, V> map,
Set<K> keys) {
private static Map<Integer, ByteBuffer> copyByteBufferMap(
Map<Integer, ByteBuffer> map, Set<Integer> keys) {
- return SerializableByteBufferMap.wrap(copyMap(map, keys));
+ if (map == null) {
+ return null;
+ }
+
+ // This is required as long as we have Map<Integer, ByteBuffer> in the API
since Parquet is
+ // re-using buffers.
+ Map<Integer, ByteBuffer> deepCopy =
Maps.newHashMapWithExpectedSize(map.size());
Review Comment:
Sgtm
--
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]