Github user mohammadshahidkhan commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1058#discussion_r122639818
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
---
@@ -447,9 +447,7 @@ private void writeDataToFile(FileChannel channel,
byte[][] dataChunkBytes) {
for (int j = 0; j < nodeHolderList.size(); j++) {
nodeHolder = nodeHolderList.get(j);
bufferSize = nodeHolder.getDataArray()[i].length;
- buffer = ByteBuffer.allocate(bufferSize);
- buffer.put(nodeHolder.getDataArray()[i]);
- buffer.flip();
+ buffer = ByteBuffer.wrap(nodeHolder.getDataArray()[i]);
--- End diff --
@jackylk If i am not wrong ByteBuffer.wrap could be used even for below
lines of code.
375-377
406-408
441-443
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---