[ https://issues.apache.org/jira/browse/PIG-5211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961941#comment-15961941 ]
Daniel Dai commented on PIG-5211: --------------------------------- There are still two Java 1.8 only code, error message when compiling with Java 1.7: {code} [javac] /Users/daijy/pig2/src/org/apache/pig/data/LimitedSortedDataBag.java:61: error: no suitable constructor found for PriorityQueue(Comparator<Tuple>) [javac] this.priorityQ = new PriorityQueue<Tuple>(getReversedComparator(mComp)); [javac] /Users/daijy/pig2/src/org/apache/pig/data/LimitedSortedDataBag.java:281: error: local variable comp is accessed from within inner class; needs to be declared final [javac] return -comp.compare(o1, o2); {code} > Optimize Nested Limited Sort > ---------------------------- > > Key: PIG-5211 > URL: https://issues.apache.org/jira/browse/PIG-5211 > Project: Pig > Issue Type: Improvement > Reporter: Jin Sun > Assignee: Jin Sun > Fix For: 0.17.0 > > Attachments: PIG-5211-1.patch, PIG-5211-2.patch, PIG-5211-3.patch > > > Currently in FOREACH clause, if both LIMIT and ORDER BY are present, pig > stores all elements and sort them. It should use a priority queue to be more > efficient in space. -- This message was sent by Atlassian JIRA (v6.3.15#6346)