You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/08/02 14:11:08 UTC

[incubator-doris] branch master updated: [Delete][Bug]fix decimal delete error (#4228)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new de7f832  [Delete][Bug]fix decimal delete error (#4228)
de7f832 is described below

commit de7f83230ca110bec8863bca10e1c4e4426bd5ae
Author: Zhengguo Yang <78...@qq.com>
AuthorDate: Sun Aug 2 22:10:56 2020 +0800

    [Delete][Bug]fix decimal delete error (#4228)
    
    Querys like DELETE FROM tbl WHERE decimal_key <= "123.456";
    when the type of decimal_key is DECIMALV2 may failed randomly,
    this is because the precision and scale is not initialized.
---
 be/src/olap/tablet_meta.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/tablet_meta.cpp b/be/src/olap/tablet_meta.cpp
index 7f75bc8..edd4aaa 100755
--- a/be/src/olap/tablet_meta.cpp
+++ b/be/src/olap/tablet_meta.cpp
@@ -125,7 +125,8 @@ TabletMeta::TabletMeta(int64_t table_id, int64_t partition_id,
         string data_type;
         EnumToString(TPrimitiveType, tcolumn.column_type.type, data_type);
         column->set_type(data_type);
-        if (tcolumn.column_type.type == TPrimitiveType::DECIMAL) {
+        if (tcolumn.column_type.type == TPrimitiveType::DECIMAL ||
+            tcolumn.column_type.type == TPrimitiveType::DECIMALV2) {
             column->set_precision(tcolumn.column_type.precision);
             column->set_frac(tcolumn.column_type.scale);
         }


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