yiguolei commented on code in PR #51766: URL: https://github.com/apache/doris/pull/51766#discussion_r2153560140
########## be/src/util/jsonb_document.h: ########## @@ -1227,6 +1317,31 @@ inline unsigned int JsonbValue::numPackedBytes() const { case JsonbType::T_Array: { return ((ContainerVal*)(this))->numPackedBytes(); } + case JsonbType::T_Decimal32: { + return (sizeof(type_) + sizeof(vectorized::Decimal32::NativeType) + + sizeof(uint32_t) * 2); // decimal128 + } + case JsonbType::T_Decimal64: { + return (sizeof(type_) + sizeof(vectorized::Decimal64::NativeType) + + sizeof(uint32_t) * 2); // decimal64 + } + case JsonbType::T_Decimal128: { + return (sizeof(type_) + sizeof(vectorized::Decimal128V3::NativeType) + + sizeof(uint32_t) * 2); // decimal128 + } + case JsonbType::T_Decimal256: { + return (sizeof(type_) + sizeof(vectorized::Decimal256::NativeType) + Review Comment: 这种逻辑应该移动到decimal的jsonb value 里来维护,否则后面有人去把scale 改成uint8,直接废了 -- 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