You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "eldenmoon (via GitHub)" <gi...@apache.org> on 2024/01/02 10:26:48 UTC

[PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

eldenmoon opened a new pull request, #29423:
URL: https://github.com/apache/doris/pull/29423

   …erflow
   
   ## Proposed changes
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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


Re: [PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #29423:
URL: https://github.com/apache/doris/pull/29423#discussion_r1448342185


##########
be/src/olap/variant_config.cpp:
##########
@@ -0,0 +1,68 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "olap/variant_config.h"
+
+#include <fmt/format.h>

Review Comment:
   warning: 'fmt/format.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <fmt/format.h>
            ^
   ```
   



##########
be/src/vec/columns/column_object.cpp:
##########
@@ -444,8 +477,10 @@
             [&](const auto& subcolumn) { return subcolumn.index(indexes, limit); });
 }
 
-bool ColumnObject::Subcolumn::check_if_sparse_column(size_t num_rows) {
-    if (num_rows < config::variant_threshold_rows_to_estimate_sparse_column) {
+bool ColumnObject::Subcolumn::check_if_sparse_column(size_t num_rows,

Review Comment:
   warning: method 'check_if_sparse_column' can be made static [readability-convert-member-functions-to-static]
   
   be/src/vec/columns/column_object.h:144:
   ```diff
   -         bool check_if_sparse_column(size_t num_rows, int rows_threshold_to_estimate_spasr,
   +         static bool check_if_sparse_column(size_t num_rows, int rows_threshold_to_estimate_spasr,
   ```
   



##########
be/src/vec/columns/column_object.cpp:
##########
@@ -271,9 +304,9 @@ size_t ColumnObject::Subcolumn::Subcolumn::allocatedBytes() const {
     return res;
 }
 
-void ColumnObject::Subcolumn::insert(Field field) {
+void ColumnObject::Subcolumn::insert(Field field, const VariantConfig& config) {

Review Comment:
   warning: method 'insert' can be made static [readability-convert-member-functions-to-static]
   
   be/src/vec/columns/column_object.h:128:
   ```diff
   -         void insert(Field field, const VariantConfig& config);
   +         static void insert(Field field, const VariantConfig& config);
   ```
   



-- 
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


Re: [PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #29423:
URL: https://github.com/apache/doris/pull/29423#discussion_r1439326621


##########
be/src/util/jsonb_writer.h:
##########
@@ -248,6 +248,18 @@ class JsonbWriterT {
         return 0;
     }
 
+    uint32_t writeDecimal(int128_t decimal) {
+        if ((first_ && stack_.empty()) || (!stack_.empty() && verifyValueState())) {
+            if (!writeFirstHeader()) return 0;

Review Comment:
   warning: statement should be inside braces [readability-braces-around-statements]
   
   ```suggestion
               if (!writeFirstHeader()) { return 0;
   }
   ```
   



-- 
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


Re: [PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

Posted by "eldenmoon (via GitHub)" <gi...@apache.org>.
eldenmoon commented on PR #29423:
URL: https://github.com/apache/doris/pull/29423#issuecomment-1873849878

   run buildall


-- 
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


Re: [PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

Posted by "eldenmoon (via GitHub)" <gi...@apache.org>.
eldenmoon commented on PR #29423:
URL: https://github.com/apache/doris/pull/29423#issuecomment-1873853454

   run buildall


-- 
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


Re: [PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #29423:
URL: https://github.com/apache/doris/pull/29423#issuecomment-1873962224

   TeamCity be ut coverage result:
    Function Coverage: 36.61% (8615/23532) 
    Line Coverage: 28.67% (70035/244294)
    Region Coverage: 27.66% (36256/131100)
    Branch Coverage: 24.36% (18529/76072)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/5fa167e7d4e5464c3077534eb1913ff489b1455b_5fa167e7d4e5464c3077534eb1913ff489b1455b/report/index.html


-- 
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


Re: [PR] [Feature](Variant) support decimal and int128 type to avoid number ov… [doris]

Posted by "eldenmoon (via GitHub)" <gi...@apache.org>.
eldenmoon closed pull request #29423: [Feature](Variant) support decimal and int128 type to avoid number ov…
URL: https://github.com/apache/doris/pull/29423


-- 
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