DRILL-5395: Query on MapR-DB table fails with NPE due to an issue with assignment logic closes #803
Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/99eba727 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/99eba727 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/99eba727 Branch: refs/heads/master Commit: 99eba727fe2a38d3bf15dd5c3fc390adfdabd1bb Parents: 25b213c Author: Padma Penumarthy <ppenuma...@yahoo.com> Authored: Tue Mar 28 15:08:54 2017 -0700 Committer: Arina Ielchiieva <arina.yelchiy...@gmail.com> Committed: Fri Apr 7 15:25:54 2017 +0300 ---------------------------------------------------------------------- .../java/org/apache/drill/exec/store/mapr/db/MapRDBGroupScan.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/99eba727/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBGroupScan.java ---------------------------------------------------------------------- diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBGroupScan.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBGroupScan.java index e6c71e0..2de30e3 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBGroupScan.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBGroupScan.java @@ -189,7 +189,7 @@ public abstract class MapRDBGroupScan extends AbstractGroupScan { PriorityQueue<List<MapRDBSubScanSpec>> minHeap = new PriorityQueue<List<MapRDBSubScanSpec>>(numSlots, LIST_SIZE_COMPARATOR); PriorityQueue<List<MapRDBSubScanSpec>> maxHeap = new PriorityQueue<List<MapRDBSubScanSpec>>(numSlots, LIST_SIZE_COMPARATOR_REV); for(List<MapRDBSubScanSpec> listOfScan : endpointFragmentMapping.values()) { - if (listOfScan.size() < minPerEndpointSlot) { + if (listOfScan.size() <= minPerEndpointSlot) { minHeap.offer(listOfScan); } else if (listOfScan.size() > minPerEndpointSlot){ maxHeap.offer(listOfScan);