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

2020-07-15 Thread 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:
us...@infra.apache.org




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

2020-06-29 Thread GitBox


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



##
File path: 
processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java
##
@@ -126,7 +125,7 @@ public boolean execute(List 
unsortedResultIteratorList,
   RawResultIterator iterator = null;
   while (index > 1) {
 // iterator the top record
-iterator = this.recordHolderHeap.poll();
+iterator = this.recordHolderHeap.peek();
 Object[] convertedRow = iterator.next();
 if (null == convertedRow) {
   index--;

Review comment:
   done





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:
us...@infra.apache.org




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

2020-06-29 Thread GitBox


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



##
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:
   ok





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:
us...@infra.apache.org