fix bug case when expr can't do batch_execute optimization
This commit is contained in:
		 yishenglanlingzui
					yishenglanlingzui
				
			
				
					committed by
					
						 ob-robot
						ob-robot
					
				
			
			
				
	
			
			
			 ob-robot
						ob-robot
					
				
			
						parent
						
							0f14606391
						
					
				
				
					commit
					4bb1033505
				
			| @ -7842,5 +7842,29 @@ int ObRawExprUtils::is_contain_params(const ObRawExpr *expr, bool &is_contain) | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| int ObRawExprUtils::check_contain_case_when_exprs(const ObRawExpr *raw_expr, bool &contain) | ||||
| { | ||||
|   int ret = OB_SUCCESS; | ||||
|   bool is_stack_overflow = false; | ||||
|   if (OB_ISNULL(raw_expr)) { | ||||
|     ret = OB_INVALID_ARGUMENT; | ||||
|     LOG_WARN("expr passed in is NULL", K(ret)); | ||||
|   } else if (OB_FAIL(check_stack_overflow(is_stack_overflow))) { | ||||
|     LOG_WARN("check stack overflow failed", K(ret)); | ||||
|   } else if (is_stack_overflow) { | ||||
|     ret = OB_SIZE_OVERFLOW; | ||||
|     LOG_WARN("too deep recursive", K(ret)); | ||||
|   } else if (raw_expr->get_expr_type() == T_OP_CASE) { | ||||
|     contain = true; | ||||
|   } else { | ||||
|     for (int64_t i = 0; OB_SUCC(ret) && !contain && i < raw_expr->get_param_count(); i++) { | ||||
|       if (OB_FAIL(SMART_CALL(check_contain_case_when_exprs(raw_expr->get_param_expr(i), contain)))) { | ||||
|         LOG_WARN("failed to replace_ref_column", KPC(raw_expr), K(i)); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user