コード例 #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();
     }
   }
 }
コード例 #2
0
 @Override
 public void close() {
   CursorLifecycle.checkIdleOrActive(this);
   if (!idle) {
     inputCursor.close();
     idle = true;
   }
 }
コード例 #3
0
 @Override
 public void open() {
   TAP_OPEN.in();
   try {
     CursorLifecycle.checkIdle(this);
     filter = bindings.getBloomFilter(bindingPosition);
     bindings.setBloomFilter(bindingPosition, null);
     inputCursor.open();
     idle = false;
   } finally {
     TAP_OPEN.out();
   }
 }
コード例 #4
0
 @Override
 public Row next() {
   if (TAP_NEXT_ENABLED) {
     TAP_NEXT.in();
   }
   try {
     if (CURSOR_LIFECYCLE_ENABLED) {
       CursorLifecycle.checkIdleOrActive(this);
     }
     checkQueryCancelation();
     Row row = null;
     while (true) {
       QueryBindings bindings = input.nextBindings();
       if (bindings == null) {
         openBindings = null;
         break;
       }
       if (bindings.getDepth() < depth) {
         pendingBindings = bindings;
         openBindings = null;
         break;
       }
       assert (bindings.getDepth() == depth);
       input.open();
       inputOpenBindings = bindings;
       row = input.next();
       input.close();
       inputOpenBindings = null;
       if (row != null) {
         row = bindings.getRow(bindingPosition);
         break;
       }
     }
     if (LOG_EXECUTION) {
       LOG.debug("Select_BloomFilter: yield {}", row);
     }
     return row;
   } finally {
     if (TAP_NEXT_ENABLED) {
       TAP_NEXT.out();
     }
   }
 }