Skip to content

Commit

Permalink
Fix Select * is only returning the first page of data
Browse files Browse the repository at this point in the history
patch by Benjamin Lerer; reviewed by Stefania Alborghetti for CASSANDRA-9913
  • Loading branch information
blerer committed Aug 10, 2015
1 parent 6e1e336 commit e98be18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Expand Up @@ -513,8 +513,10 @@ public boolean areRequestedBoundsInclusive(Bound bound)
*/
public boolean isColumnRange()
{
// For static compact tables we need to ignore the fake clustering column.
int numberOfClusteringColumns = cfm.isStaticCompactTable() ? 0 : cfm.clusteringColumns().size();
// it is a range query if it has at least one the column alias for which no relation is defined or is not EQ.
return clusteringColumnsRestrictions.size() < cfm.clusteringColumns().size()
return clusteringColumnsRestrictions.size() < numberOfClusteringColumns
|| (!clusteringColumnsRestrictions.isEQ() && !clusteringColumnsRestrictions.isIN());
}

Expand Down
Expand Up @@ -337,7 +337,12 @@ else if (restrictions.keyIsInRelation())
try (PartitionIterator iter = pager.fetchPage(pageSize))
{
while (iter.hasNext())
processPartition(iter.next(), options, result, nowInSec);
{
try (RowIterator partition = iter.next())
{
processPartition(partition, options, result, nowInSec);
}
}
}
}
return new ResultMessage.Rows(result.build(options.getProtocolVersion()));
Expand Down

0 comments on commit e98be18

Please sign in to comment.