Fix: Add a trim bug to the virtual generated column in the scenario of building a prefix index

This commit is contained in:
obdev
2023-02-17 17:41:50 +00:00
committed by ob-robot
parent 41e3f16c87
commit 2d13af9ae5

View File

@ -6174,7 +6174,7 @@ int ObDMLResolver::build_padding_expr(const ObSQLSessionInfo *session,
// Since we expanded the generated column into a dependent expression,
// we need to add trim on its dependent expression in this layer.
if (const_cast<ObSQLSessionInfo *>(session)->get_ddl_info().is_ddl() &&
stmt::T_INSERT == session->get_stmt_type()) {
stmt::T_INSERT == session->get_stmt_type() && column_schema->is_virtual_generated_column()) {
if (OB_FAIL(ObRawExprUtils::build_trim_expr(column_schema,
*params_.expr_factory_,
session_info_,