guiyanakuang commented on a change in pull request #915:
URL: https://github.com/apache/orc/pull/915#discussion_r713684138
##########
File path: java/core/src/java/org/apache/orc/impl/ColumnStatisticsImpl.java
##########
@@ -423,6 +502,12 @@ public void merge(ColumnStatisticsImpl other) {
if (!overflow) {
intb.setSum(sum);
}
+ if (tDigest != null && digestConf.getPersistence()) {
+ ByteBuffer byteBuffer = ByteBuffer.allocate(tDigest.byteSize());
+ tDigest.asBytes(byteBuffer);
+ byteBuffer.flip();
Review comment:
A statement after : `intb.setDigest(ByteString.copyFrom(byteBuffer));`
```
public static ByteString copyFrom(ByteBuffer bytes) {
return copyFrom(bytes, bytes.remaining());
}
```
ByteBuffer to ByteString, flipped to read the correct size.
--
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]