Skip to content

Commit 3627a34

Browse files
footkaobdev
andauthored
physical_plan_ctx/sql_ctx may be empty anyway In MV scenarios, and should be gracefully skipped
Co-authored-by: obdev <obdev@oceanbase.com> Co-authored-by: footka <footka@users.noreply.github.com>
1 parent 8b07ab1 commit 3627a34

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/sql/resolver/expr/ob_raw_expr_type_demotion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ int ObRawExprTypeDemotion::init_query_ctx_flags(bool &disabled)
184184
ret = OB_ERR_UNEXPECTED;
185185
LOG_WARN("session or expr factory is null", K(ret), KP(session_), KP(expr_factory_));
186186
} else if (OB_ISNULL(exec_ctx = const_cast<ObExecContext *>(session_->get_cur_exec_ctx()))
187+
|| OB_ISNULL(exec_ctx->get_sql_ctx())
188+
|| OB_ISNULL(exec_ctx->get_physical_plan_ctx())
187189
|| OB_ISNULL(query_ctx_ = expr_factory_->get_query_ctx())) {
188190
// exec ctx and query ctx may be null, in which case the type demotion is disabled.
189191
disabled = true;

0 commit comments

Comments
 (0)