github-actions[bot] commented on code in PR #63794:
URL: https://github.com/apache/doris/pull/63794#discussion_r3338171845
##########
be/src/storage/tablet_info.cpp:
##########
@@ -297,6 +298,9 @@ Status OlapTableSchemaParam::init(const
TOlapTableSchemaParam& tschema) {
if (tschema.__isset.is_strict_mode) {
_is_strict_mode = tschema.is_strict_mode;
}
+ if (tschema.__isset.is_insert) {
+ _is_insert = tschema.is_insert;
Review Comment:
This leaves `_is_insert` false whenever the schema param comes from an older
FE that does not know field 18. New BE then runs the non-insert branch in
`OlapTableBlockConvertor`; for a normal old-FE insert, `is_strict_mode` is
false unless it is the partial-update special case, while the old
`query_options.enable_insert_strict` signal is now ignored. A strict insert
from an old FE can therefore be treated as non-strict and truncate overlong
strings during rolling upgrade. Please preserve a compatibility fallback for
schema params where `is_insert` is unset, or keep using the old query option
for that case.
##########
be/src/runtime/runtime_state.h:
##########
@@ -239,8 +239,9 @@ class RuntimeState {
return _query_options.__isset.enable_strict_cast &&
_query_options.enable_strict_cast;
}
- bool enable_insert_strict() const {
- return _query_options.__isset.enable_insert_strict &&
_query_options.enable_insert_strict;
+ bool enable_insert_value_auto_cast() const {
+ return _query_options.__isset.enable_insert_value_auto_cast &&
+ _query_options.enable_insert_value_auto_cast;
Review Comment:
This optional thrift field has a declared default of `true`, but this
accessor returns `false` whenever the field is unset. That changes behavior for
any path that constructs `TQueryOptions` without explicitly setting the new
field, including mixed-version execution where an old FE sends fragments to a
new BE. In that case `enable_insert_value_auto_cast` should keep its
default-enabled behavior, but `__isset` is false and insert-side truncation is
disabled. Please treat unset as the thrift/default value, e.g.
`!__isset.enable_insert_value_auto_cast ||
_query_options.enable_insert_value_auto_cast`.
--
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]