[CP] fix partition wise join and global index lookup -4016
This commit is contained in:
		@ -1652,6 +1652,9 @@ bool ObTableScanOp::need_real_rescan()
 | 
			
		||||
  bool bret = false;
 | 
			
		||||
  if (!MY_SPEC.batch_scan_flag_) {
 | 
			
		||||
    bret = true;
 | 
			
		||||
  } else if (tsc_rtdef_.bnlj_params_.empty()) {
 | 
			
		||||
    //batch rescan not init, need to do real rescan
 | 
			
		||||
    bret = true;
 | 
			
		||||
  } else {
 | 
			
		||||
    ObPhysicalPlanCtx *plan_ctx = GET_PHY_PLAN_CTX(ctx_);
 | 
			
		||||
    int64_t param_idx = tsc_rtdef_.bnlj_params_.at(0).param_idx_;
 | 
			
		||||
@ -3059,7 +3062,10 @@ int ObGlobalIndexLookupOpImpl::close()
 | 
			
		||||
int ObGlobalIndexLookupOpImpl::rescan()
 | 
			
		||||
{
 | 
			
		||||
  int ret = OB_SUCCESS;
 | 
			
		||||
  if (get_batch_rescan() && lookup_group_cnt_ < index_group_cnt_) {
 | 
			
		||||
  if (OB_ISNULL(table_scan_op_)) {
 | 
			
		||||
    ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
    LOG_WARN("table scan op not init", K(ret));
 | 
			
		||||
  } else if (!table_scan_op_->need_real_rescan() && lookup_group_cnt_ < index_group_cnt_) {
 | 
			
		||||
    LOG_DEBUG("rescan in group lookup, only need to switch iterator",
 | 
			
		||||
              K(lookup_group_cnt_), K(index_group_cnt_));
 | 
			
		||||
    if (OB_FAIL(table_scan_op_->build_bnlj_params())) {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user