Ejemplo 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();
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void close() {
   CursorLifecycle.checkIdleOrActive(this);
   if (!idle) {
     inputCursor.close();
     idle = true;
   }
 }
Ejemplo n.º 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();
   }
 }
Ejemplo n.º 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();
     }
   }
 }