[GitHub] [carbondata] kevinjmh opened a new pull request #3804: [CARBONDATA-3871] Optimize performance when getting row from heap

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kevinjmh commented on a change in pull request #3804: [CARBONDATA-3871] Optimize performance when getting row from heap

GitBox

kevinjmh commented on a change in pull request #3804:
URL: https://github.com/apache/carbondata/pull/3804#discussion_r454913685



##########
File path: processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeInMemoryIntermediateDataMerger.java
##########
@@ -141,25 +140,26 @@ private UnsafeCarbonRowForMerge getSortedRecordFromMemory() {
     // be based on comparator we are passing the heap
     // when will call poll it will always delete root of the tree and then
     // it does trickel down operation complexity is log(n)
-    UnsafeInmemoryMergeHolder poll = this.recordHolderHeap.poll();
+    UnsafeInmemoryMergeHolder poll = this.recordHolderHeap.peek();
 
     // get the row from chunk
     row = poll.getRow();
 
     // check if there no entry present
     if (!poll.hasNext()) {
+      this.recordHolderHeap.poll();

Review comment:
       @QiangCai Please check #3845




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[hidden email]


12