src/backend/executor/index_scan_executor.cpp
/**
 * @brief Creates logical tile(s) after scanning index.
 * @return true on success, false otherwise.
 */
@brief Creates logical tile(s) after scanning index.
@return true on success, false otherwise.
@brief Creates logical tile ( s ) after scanning index . @return true on success false otherwise .
bool IndexScanExecutor::DExecute() {
  LOG_INFO("Index Scan executor :: 0 child");
  if (!done_) {
    if (index_->GetIndexType() == INDEX_CONSTRAINT_TYPE_PRIMARY_KEY) {
      auto status = ExecPrimaryIndexLookup();
      if (status == false) return false;
    } else {
      auto status = ExecSecondaryIndexLookup();
      if (status == false) return false;
    }
  }
  assert(done_);
  while (result_itr_ < result_.size()) {  
    if (result_[result_itr_]->GetTupleCount() == 0) {
      result_itr_++;
      continue;
    } else {
      SetOutput(result_[result_itr_]);
      result_itr_++;
      return true;
    }
  }  
  return false;
}
bool IndexScanExecutor :: DExecute ( ) { LOG_INFO ( " " ) ; if ( ! done_ ) { if ( index_ -> GetIndexType ( ) == INDEX_CONSTRAINT_TYPE_PRIMARY_KEY ) { auto status = ExecPrimaryIndexLookup ( ) ; if ( status == false ) return false ; } else { auto status = ExecSecondaryIndexLookup ( ) ; if ( status == false ) return false ; } } assert ( done_ ) ; while ( result_itr_ < result_ . size ( ) ) { if ( result_ [ result_itr_ ] -> GetTupleCount ( ) == 0 ) { result_itr_ ++ ; continue ; } else { SetOutput ( result_ [ result_itr_ ] ) ; result_itr_ ++ ; return true ; } } return false ; }
@brief Creates logical tile(s) after scanning index.
@brief Creates logical tile ( s ) after scanning index .
// Already performed the index lookup // Avoid returning empty tiles // end while