You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zhangstar333 (via GitHub)" <gi...@apache.org> on 2023/04/25 08:09:19 UTC

[GitHub] [doris] zhangstar333 commented on a diff in pull request #19056: [Fix](schema scanner) Fixed the problem of overflow when multiplying two INT

zhangstar333 commented on code in PR #19056:
URL: https://github.com/apache/doris/pull/19056#discussion_r1176160153


##########
be/src/exec/schema_scanner/schema_columns_scanner.cpp:
##########
@@ -455,7 +455,9 @@ Status SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
             if (data_type == TPrimitiveType::VARCHAR || data_type == TPrimitiveType::CHAR ||
                 data_type == TPrimitiveType::STRING) {
                 if (_desc_result.columns[i].columnDesc.__isset.columnLength) {
-                    srcs[i] = _desc_result.columns[i].columnDesc.columnLength * 4;
+                    srcs[i] =
+                            static_cast<int64_t>(_desc_result.columns[i].columnDesc.columnLength) *
+                            4;

Review Comment:
   seems could use `length * 4L`



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org