Exemplo n.º 1
0
 @Override
 public Row next() {
   if (TAP_NEXT_ENABLED) {
     TAP_NEXT.in();
   }
   try {
     if (CURSOR_LIFECYCLE_ENABLED) {
       CursorLifecycle.checkIdleOrActive(this);
     }
     Row row;
     do {
       row = inputCursor.next();
       if (row == null) {
         close();
       } else if (!filter.maybePresent(hashProjectedRow(row)) || !rowReallyHasMatch(row)) {
         row = null;
       }
     } while (!idle && row == null);
     if (LOG_EXECUTION) {
       LOG.debug("Select_BloomFilter: yield {}", row);
     }
     return row;
   } finally {
     if (TAP_NEXT_ENABLED) {
       TAP_NEXT.out();
     }
   }
 }
Exemplo n.º 2
0
 @Override
 public Row next() {
   if (TAP_NEXT_ENABLED) {
     TAP_NEXT.in();
   }
   try {
     if (CURSOR_LIFECYCLE_ENABLED) {
       CursorLifecycle.checkIdleOrActive(this);
     }
     checkQueryCancelation();
     Row row;
     while (skipLeft > 0) {
       if ((row = input.next()) == null) {
         skipLeft = 0;
         limitLeft = -1;
         setIdle();
         if (LOG_EXECUTION) {
           LOG.debug("Limit_Default: skipLeft until complete yield null");
         }
         return null;
       }
       skipLeft--;
     }
     if (limitLeft < 0) {
       setIdle();
       if (LOG_EXECUTION) {
         LOG.debug("Limit_Default: limitLeft < 0, yield null");
       }
       return null;
     }
     if (limitLeft == 0) {
       setIdle();
       if (LOG_EXECUTION) {
         LOG.debug("Limit_Default: limitLeft == 0, yield null");
       }
       return null;
     }
     if ((row = input.next()) == null) {
       limitLeft = -1;
       setIdle();
       if (LOG_EXECUTION) {
         LOG.debug("Limit_Default: yield null");
       }
       return null;
     }
     --limitLeft;
     if (LOG_EXECUTION) {
       LOG.debug("Limit_Default: yield {}", row);
     }
     return row;
   } finally {
     if (TAP_NEXT_ENABLED) {
       TAP_NEXT.out();
     }
   }
 }