kadirozde commented on a change in pull request #973:
URL: https://github.com/apache/phoenix/pull/973#discussion_r545508156
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/iterate/OrderedResultIterator.java
##########
@@ -245,23 +256,33 @@ public int compare(ImmutableBytesWritable o1,
ImmutableBytesWritable o2) {
@Override
public Tuple next() throws SQLException {
- return getResultIterator().next();
+ getResultIterator();
+ if (!resultIteratorReady) {
+ return dummyTuple;
+ }
+ return resultIterator.next();
}
private PeekingResultIterator getResultIterator() throws SQLException {
- if (resultIterator != null) {
+ if (resultIteratorReady) {
Review comment:
The results have not been ordered yet. When the results are ordered then
the result iterator will be ready to iterate over them. I will add a comment
for that.
----------------------------------------------------------------
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:
[email protected]