zhiqiang-hhhh commented on code in PR #43050: URL: https://github.com/apache/doris/pull/43050#discussion_r1834385455
########## be/src/vec/data_types/convert_field_to_type.cpp: ########## @@ -257,7 +258,8 @@ void convert_field_to_typeImpl(const Field& src, const IDataType& type, JsonbWriter writer; Field::dispatch([&writer](const auto& value) { FieldVisitorToJsonb()(value, &writer); }, src); - *to = JsonbField(writer.getOutput()->getBuffer(), writer.getOutput()->getSize()); + *to = JsonbField(writer.getOutput()->getBuffer(), + static_cast<UInt32>(writer.getOutput()->getSize())); Review Comment: 1. Actually the impl of `cast_set` will do value check in all build type. 2. `convert_field_to_typeImpl` will be called on every tuple of the array. Don't want to introduce performance issue so I tried `cast_set<UInt32,UInt64, false>` 3. After I checked the impl of `cast_set`, I found `cast_set<UInt32,UInt64, false>` equals to static_cast so I use static_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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org