Index: core/src/main/java/org/apache/hadoop/hbase/regionserver/ExplicitColumnTracker.java =================================================================== --- core/src/main/java/org/apache/hadoop/hbase/regionserver/ExplicitColumnTracker.java (revision 916050) +++ core/src/main/java/org/apache/hadoop/hbase/regionserver/ExplicitColumnTracker.java Thu Feb 25 01:37:30 PST 2010 @@ -83,7 +83,6 @@ * @return MatchCode telling QueryMatcher what action to take */ public MatchCode checkColumn(byte [] bytes, int offset, int length) { - boolean recursive = false; do { // No more columns left, we are done with this query if(this.columns.size() == 0) { @@ -114,6 +113,12 @@ return MatchCode.INCLUDE; } + + if (ret > 0) { + // Specified column is smaller than the current, skip to next column. + return MatchCode.SKIP; + } + // Specified column is bigger than current column // Move down current column and check again if(ret <= -1) { @@ -121,15 +126,11 @@ // No more to match, do not include, done with storefile return MatchCode.NEXT; // done_row } + + // This is the recursive case. this.column = this.columns.get(this.index); - recursive = true; - continue; } - } while(recursive); - - // Specified column is smaller than current column - // Skip - return MatchCode.SKIP; // skip to next column, with hint? + } while(true); } /**