Fix generated column bug

This commit is contained in:
2149
2023-07-05 12:12:09 +00:00
committed by ob-robot
parent d3d59029b1
commit e984dbcfb0
4 changed files with 116 additions and 22 deletions

View File

@ -894,7 +894,8 @@ int ObExprCast::is_valid_for_generated_column(const ObRawExpr*expr, const common
}
} else if (ObTimeType == src && ObTimeType != dst && ob_is_temporal_type(dst)) {
is_valid = false;
} else if (ObTimestampType == src && ObTimestampType != dst) {
} else if ((ObTimestampType == src && ObTimestampType != dst)
|| (ObTimestampType == dst && ObTimestampType != src)) {
is_valid = false;
}
}