kaijchen commented on code in PR #32120:
URL: https://github.com/apache/doris/pull/32120#discussion_r1522377148
##########
be/src/vec/functions/function_cast.h:
##########
@@ -432,6 +432,16 @@ struct ConvertImpl {
block.get_by_position(result).column =
ColumnNullable::create(std::move(col_to),
std::move(col_null_map_to));
return Status::OK();
+ } else if constexpr (IsDataTypeNumber<FromDataType> &&
+ IsDataTypeNumber<ToDataType>) {
+ for (size_t i = 0; i < size; ++i) {
+ if (vec_from[i] < min_result || vec_from[i] >
max_result) {
+ return Status::InternalError(
+ "Out of range value for column '{}' at row
{}",
Review Comment:
改成了 Postgres style 的 `Error: SMALLINT out of range`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]