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 2022/12/14 03:35:42 UTC

[doris] branch branch-1.2-lts updated (c2f5d67fb7 -> 2623ae88f7)

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

morningman pushed a change to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


    from c2f5d67fb7 [fix](multi-catalog) fix persist issue about jdbc catalog and class loader issue (#14794)
     new 421807094d [fix](tpch-tools)  disable join reorder for Q12 in TPC-H tools (#14728)
     new 70430c8a05 [test](decimalv3) add regression test cases for decimalv3 (#14672)
     new 2623ae88f7 [minor](decimal) degrade log level for overflow decimal (#14748)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../segment_v2/bloom_filter_index_writer.cpp       |  60 ++----
 .../aggregate_function_stddev.cpp                  |   2 +-
 be/src/vec/data_types/data_type_decimal.cpp        |  24 ---
 be/src/vec/data_types/data_type_decimal.h          |  45 +++--
 be/src/vec/exec/scan/vscan_node.cpp                |   4 +-
 be/src/vec/io/io_helper.h                          |  15 +-
 .../apache/doris/analysis/FunctionCallExpr.java    |   4 +
 .../java/org/apache/doris/analysis/TypeDef.java    |   8 +-
 .../apache/doris/datasource/InternalCatalog.java   |   2 +-
 .../test_create_table_with_bloom_filter.out        |   8 +-
 .../correctness_p0/test_select_variance_agg.out    |  11 +-
 .../decimalv3/test_agg_tab_decimalv3.out           |  84 ++++++++
 .../decimalv3/test_dup_tab_decimalv3.out           | 213 +++++++++++++++++++++
 .../decimalv3/test_uniq_tab_decimalv3.out          |  87 +++++++++
 .../data/ddl_p0/test_ctas_decimalv3.out            |  13 ++
 .../test_agg_keys_schema_change_decimalv3.out      |  31 +++
 .../test_create_table_with_bloom_filter.groovy     |  25 ++-
 .../correctness_p0/test_select_variance_agg.groovy |  11 +-
 .../decimalv3/test_agg_tab_decimalv3.groovy        |  91 +++++++++
 .../decimalv3/test_dup_tab_decimalv3.groovy        |  91 +++++++++
 .../decimalv3/test_uniq_tab_decimalv3.groovy       |  91 +++++++++
 .../suites/ddl_p0/test_ctas_decimalv3.groovy       |  66 +++++++
 .../test_agg_keys_schema_change_decimalv3.groovy}  | 110 ++++++-----
 tools/tpch-tools/queries/q12.sql                   |   2 +-
 24 files changed, 944 insertions(+), 154 deletions(-)
 create mode 100644 regression-test/data/datatype_p0/decimalv3/test_agg_tab_decimalv3.out
 create mode 100644 regression-test/data/datatype_p0/decimalv3/test_dup_tab_decimalv3.out
 create mode 100644 regression-test/data/datatype_p0/decimalv3/test_uniq_tab_decimalv3.out
 create mode 100644 regression-test/data/ddl_p0/test_ctas_decimalv3.out
 create mode 100644 regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out
 create mode 100644 regression-test/suites/datatype_p0/decimalv3/test_agg_tab_decimalv3.groovy
 create mode 100644 regression-test/suites/datatype_p0/decimalv3/test_dup_tab_decimalv3.groovy
 create mode 100644 regression-test/suites/datatype_p0/decimalv3/test_uniq_tab_decimalv3.groovy
 create mode 100644 regression-test/suites/ddl_p0/test_ctas_decimalv3.groovy
 copy regression-test/suites/schema_change_p0/{datev2/test_dup_keys_schema_change_datev2.groovy => decimalv3/test_agg_keys_schema_change_decimalv3.groovy} (61%)


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


[doris] 01/03: [fix](tpch-tools) disable join reorder for Q12 in TPC-H tools (#14728)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 421807094d2b574c8fd2dbdc5f7e80dfb6cc44a4
Author: minghong <mi...@163.com>
AuthorDate: Thu Dec 1 20:55:17 2022 +0800

    [fix](tpch-tools)  disable join reorder for Q12 in TPC-H tools (#14728)
---
 tools/tpch-tools/queries/q12.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tpch-tools/queries/q12.sql b/tools/tpch-tools/queries/q12.sql
index 5fcd65c635..3ab14e2ff2 100644
--- a/tools/tpch-tools/queries/q12.sql
+++ b/tools/tpch-tools/queries/q12.sql
@@ -15,7 +15,7 @@
 -- specific language governing permissions and limitations
 -- under the License.
 
-select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=2, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=false, enable_cost_based_join_reorder=true, enable_projection=true) */
+select /*+SET_VAR(exec_mem_limit=8589934592, parallel_fragment_exec_instance_num=2, enable_vectorized_engine=true, batch_size=4096, disable_join_reorder=true, enable_cost_based_join_reorder=true, enable_projection=true) */
     l_shipmode,
     sum(case
         when o_orderpriority = '1-URGENT'


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


[doris] 03/03: [minor](decimal) degrade log level for overflow decimal (#14748)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2623ae88f7caa2ce4a616fb29d9dacca2c853403
Author: Gabriel <ga...@gmail.com>
AuthorDate: Fri Dec 2 15:55:26 2022 +0800

    [minor](decimal) degrade log level for overflow decimal (#14748)
---
 be/src/vec/data_types/data_type_decimal.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/be/src/vec/data_types/data_type_decimal.h b/be/src/vec/data_types/data_type_decimal.h
index 1ccce064cf..ea29954293 100644
--- a/be/src/vec/data_types/data_type_decimal.h
+++ b/be/src/vec/data_types/data_type_decimal.h
@@ -336,7 +336,7 @@ convert_decimals(const typename FromDataType::FieldType& value, UInt32 scale_fro
                 DataTypeDecimal<MaxFieldType>::get_scale_multiplier(scale_to - scale_from);
         if (common::mul_overflow(static_cast<MaxNativeType>(value), converted_value,
                                  converted_value)) {
-            LOG(WARNING) << "Decimal convert overflow";
+            VLOG_DEBUG << "Decimal convert overflow";
             return converted_value < 0
                            ? std::numeric_limits<typename ToFieldType::NativeType>::min()
                            : std::numeric_limits<typename ToFieldType::NativeType>::max();
@@ -348,11 +348,11 @@ convert_decimals(const typename FromDataType::FieldType& value, UInt32 scale_fro
 
     if constexpr (sizeof(FromFieldType) > sizeof(ToFieldType)) {
         if (converted_value < std::numeric_limits<typename ToFieldType::NativeType>::min()) {
-            LOG(WARNING) << "Decimal convert overflow";
+            VLOG_DEBUG << "Decimal convert overflow";
             return std::numeric_limits<typename ToFieldType::NativeType>::min();
         }
         if (converted_value > std::numeric_limits<typename ToFieldType::NativeType>::max()) {
-            LOG(WARNING) << "Decimal convert overflow";
+            VLOG_DEBUG << "Decimal convert overflow";
             return std::numeric_limits<typename ToFieldType::NativeType>::max();
         }
     }
@@ -381,11 +381,11 @@ convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale
                       !std::numeric_limits<ToFieldType>::is_signed) {
             if constexpr (std::numeric_limits<ToFieldType>::is_signed) {
                 if (converted_value < std::numeric_limits<ToFieldType>::min()) {
-                    LOG(WARNING) << "Decimal convert overflow";
+                    VLOG_DEBUG << "Decimal convert overflow";
                     return std::numeric_limits<ToFieldType>::min();
                 }
                 if (converted_value > std::numeric_limits<ToFieldType>::max()) {
-                    LOG(WARNING) << "Decimal convert overflow";
+                    VLOG_DEBUG << "Decimal convert overflow";
                     return std::numeric_limits<ToFieldType>::max();
                 }
             } else {
@@ -395,7 +395,7 @@ convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale
                 if (converted_value < 0 ||
                     converted_value >
                             static_cast<CastIntType>(std::numeric_limits<ToFieldType>::max())) {
-                    LOG(WARNING) << "Decimal convert overflow";
+                    VLOG_DEBUG << "Decimal convert overflow";
                     return std::numeric_limits<ToFieldType>::max();
                 }
             }
@@ -413,7 +413,7 @@ convert_to_decimal(const typename FromDataType::FieldType& value, UInt32 scale)
 
     if constexpr (std::is_floating_point_v<FromFieldType>) {
         if (!std::isfinite(value)) {
-            LOG(WARNING) << "Decimal convert overflow. Cannot convert infinity or NaN to decimal";
+            VLOG_DEBUG << "Decimal convert overflow. Cannot convert infinity or NaN to decimal";
             return value < 0 ? std::numeric_limits<ToNativeType>::min()
                              : std::numeric_limits<ToNativeType>::max();
         }
@@ -421,11 +421,11 @@ convert_to_decimal(const typename FromDataType::FieldType& value, UInt32 scale)
         FromFieldType out;
         out = value * ToDataType::get_scale_multiplier(scale);
         if (out <= static_cast<FromFieldType>(std::numeric_limits<ToNativeType>::min())) {
-            LOG(WARNING) << "Decimal convert overflow. Float is out of Decimal range";
+            VLOG_DEBUG << "Decimal convert overflow. Float is out of Decimal range";
             return std::numeric_limits<ToNativeType>::min();
         }
         if (out >= static_cast<FromFieldType>(std::numeric_limits<ToNativeType>::max())) {
-            LOG(WARNING) << "Decimal convert overflow. Float is out of Decimal range";
+            VLOG_DEBUG << "Decimal convert overflow. Float is out of Decimal range";
             return std::numeric_limits<ToNativeType>::max();
         }
         return out;


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


[doris] 02/03: [test](decimalv3) add regression test cases for decimalv3 (#14672)

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 70430c8a05c4c951646ca0175386f0d71c419c46
Author: Gabriel <ga...@gmail.com>
AuthorDate: Thu Dec 1 15:18:40 2022 +0800

    [test](decimalv3) add regression test cases for decimalv3 (#14672)
---
 .../segment_v2/bloom_filter_index_writer.cpp       |  60 ++----
 .../aggregate_function_stddev.cpp                  |   2 +-
 be/src/vec/data_types/data_type_decimal.cpp        |  24 ---
 be/src/vec/data_types/data_type_decimal.h          |  33 +++-
 be/src/vec/exec/scan/vscan_node.cpp                |   4 +-
 be/src/vec/io/io_helper.h                          |  15 +-
 .../apache/doris/analysis/FunctionCallExpr.java    |   4 +
 .../java/org/apache/doris/analysis/TypeDef.java    |   8 +-
 .../apache/doris/datasource/InternalCatalog.java   |   2 +-
 .../test_create_table_with_bloom_filter.out        |   8 +-
 .../correctness_p0/test_select_variance_agg.out    |  11 +-
 .../decimalv3/test_agg_tab_decimalv3.out           |  84 ++++++++
 .../decimalv3/test_dup_tab_decimalv3.out           | 213 +++++++++++++++++++++
 .../decimalv3/test_uniq_tab_decimalv3.out          |  87 +++++++++
 .../data/ddl_p0/test_ctas_decimalv3.out            |  13 ++
 .../test_agg_keys_schema_change_decimalv3.out      |  31 +++
 .../test_create_table_with_bloom_filter.groovy     |  25 ++-
 .../correctness_p0/test_select_variance_agg.groovy |  11 +-
 .../decimalv3/test_agg_tab_decimalv3.groovy        |  91 +++++++++
 .../decimalv3/test_dup_tab_decimalv3.groovy        |  91 +++++++++
 .../decimalv3/test_uniq_tab_decimalv3.groovy       |  91 +++++++++
 .../suites/ddl_p0/test_ctas_decimalv3.groovy       |  66 +++++++
 .../test_agg_keys_schema_change_decimalv3.groovy   | 209 ++++++++++++++++++++
 23 files changed, 1088 insertions(+), 95 deletions(-)

diff --git a/be/src/olap/rowset/segment_v2/bloom_filter_index_writer.cpp b/be/src/olap/rowset/segment_v2/bloom_filter_index_writer.cpp
index 3e57a1db90..5542a6068d 100644
--- a/be/src/olap/rowset/segment_v2/bloom_filter_index_writer.cpp
+++ b/be/src/olap/rowset/segment_v2/bloom_filter_index_writer.cpp
@@ -176,47 +176,27 @@ Status BloomFilterIndexWriter::create(const BloomFilterOptions& bf_options,
                                       std::unique_ptr<BloomFilterIndexWriter>* res) {
     FieldType type = type_info->type();
     switch (type) {
-    case OLAP_FIELD_TYPE_SMALLINT:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_SMALLINT>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_INT:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_INT>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_UNSIGNED_INT:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_UNSIGNED_INT>(bf_options,
-                                                                                type_info));
-        break;
-    case OLAP_FIELD_TYPE_BIGINT:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_BIGINT>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_LARGEINT:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_LARGEINT>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_CHAR:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_CHAR>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_VARCHAR:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_VARCHAR>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_STRING:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_STRING>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_DATE:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_DATE>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_DATETIME:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_DATETIME>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_DECIMAL:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_DECIMAL>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_DATEV2:
-        res->reset(new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_DATEV2>(bf_options, type_info));
-        break;
-    case OLAP_FIELD_TYPE_DATETIMEV2:
-        res->reset(
-                new BloomFilterIndexWriterImpl<OLAP_FIELD_TYPE_DATETIMEV2>(bf_options, type_info));
+#define M(TYPE)                                                                  \
+    case TYPE:                                                                   \
+        res->reset(new BloomFilterIndexWriterImpl<TYPE>(bf_options, type_info)); \
         break;
+        M(OLAP_FIELD_TYPE_SMALLINT)
+        M(OLAP_FIELD_TYPE_INT)
+        M(OLAP_FIELD_TYPE_UNSIGNED_INT)
+        M(OLAP_FIELD_TYPE_BIGINT)
+        M(OLAP_FIELD_TYPE_LARGEINT)
+        M(OLAP_FIELD_TYPE_CHAR)
+        M(OLAP_FIELD_TYPE_VARCHAR)
+        M(OLAP_FIELD_TYPE_STRING)
+        M(OLAP_FIELD_TYPE_DATE)
+        M(OLAP_FIELD_TYPE_DATETIME)
+        M(OLAP_FIELD_TYPE_DECIMAL)
+        M(OLAP_FIELD_TYPE_DATEV2)
+        M(OLAP_FIELD_TYPE_DATETIMEV2)
+        M(OLAP_FIELD_TYPE_DECIMAL32)
+        M(OLAP_FIELD_TYPE_DECIMAL64)
+        M(OLAP_FIELD_TYPE_DECIMAL128I)
+#undef M
     default:
         return Status::NotSupported("unsupported type for bitmap index: {}", std::to_string(type));
     }
diff --git a/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp b/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
index f1510dd568..b83c9043bd 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
+++ b/be/src/vec/aggregate_functions/aggregate_function_stddev.cpp
@@ -60,7 +60,7 @@ static IAggregateFunction* create_function_single_value(const String& name,
     }
     if (which.is_decimal128i()) {
         return new AggregateFunctionTemplate<
-                NameData<Data<Decimal128, BaseDatadecimal<Decimal128, is_stddev>>>, is_nullable>(
+                NameData<Data<Decimal128I, BaseDatadecimal<Decimal128I, is_stddev>>>, is_nullable>(
                 argument_types);
     }
     DCHECK(false) << "with unknowed type, failed in  create_aggregate_function_stddev_variance";
diff --git a/be/src/vec/data_types/data_type_decimal.cpp b/be/src/vec/data_types/data_type_decimal.cpp
index 075469d42e..aa1da12e4d 100644
--- a/be/src/vec/data_types/data_type_decimal.cpp
+++ b/be/src/vec/data_types/data_type_decimal.cpp
@@ -202,30 +202,6 @@ Decimal128I DataTypeDecimal<Decimal128I>::get_scale_multiplier(UInt32 scale) {
     return common::exp10_i128(scale);
 }
 
-template <typename T>
-void convert_to_decimal(T* from_value, T* to_value, int32_t from_scale, int32_t to_scale,
-                        bool* loss_accuracy) {
-    if (from_scale == to_scale) {
-        *to_value = *from_value;
-        return;
-    }
-    if (from_scale > to_scale) {
-        *to_value =
-                (*from_value) / static_cast<T>(DataTypeDecimal<Decimal<T>>::get_scale_multiplier(
-                                        from_scale - to_scale));
-        *loss_accuracy =
-                ((*from_value) % static_cast<T>(DataTypeDecimal<Decimal<T>>::get_scale_multiplier(
-                                         from_scale - to_scale))) != 0;
-    } else {
-        if (common::mul_overflow(*from_value,
-                                 static_cast<T>(DataTypeDecimal<Decimal<T>>::get_scale_multiplier(
-                                         to_scale - from_scale)),
-                                 *to_value)) {
-            LOG(WARNING) << "Decimal convert overflow";
-        }
-    }
-}
-
 template <typename T>
 typename T::NativeType max_decimal_value(UInt32 precision) {
     return 0;
diff --git a/be/src/vec/data_types/data_type_decimal.h b/be/src/vec/data_types/data_type_decimal.h
index d07db5f2ef..1ccce064cf 100644
--- a/be/src/vec/data_types/data_type_decimal.h
+++ b/be/src/vec/data_types/data_type_decimal.h
@@ -337,6 +337,9 @@ convert_decimals(const typename FromDataType::FieldType& value, UInt32 scale_fro
         if (common::mul_overflow(static_cast<MaxNativeType>(value), converted_value,
                                  converted_value)) {
             LOG(WARNING) << "Decimal convert overflow";
+            return converted_value < 0
+                           ? std::numeric_limits<typename ToFieldType::NativeType>::min()
+                           : std::numeric_limits<typename ToFieldType::NativeType>::max();
         }
     } else {
         converted_value =
@@ -344,9 +347,13 @@ convert_decimals(const typename FromDataType::FieldType& value, UInt32 scale_fro
     }
 
     if constexpr (sizeof(FromFieldType) > sizeof(ToFieldType)) {
-        if (converted_value < std::numeric_limits<typename ToFieldType::NativeType>::min() ||
-            converted_value > std::numeric_limits<typename ToFieldType::NativeType>::max()) {
+        if (converted_value < std::numeric_limits<typename ToFieldType::NativeType>::min()) {
             LOG(WARNING) << "Decimal convert overflow";
+            return std::numeric_limits<typename ToFieldType::NativeType>::min();
+        }
+        if (converted_value > std::numeric_limits<typename ToFieldType::NativeType>::max()) {
+            LOG(WARNING) << "Decimal convert overflow";
+            return std::numeric_limits<typename ToFieldType::NativeType>::max();
         }
     }
 
@@ -373,9 +380,13 @@ convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale
         if constexpr (sizeof(FromFieldType) > sizeof(ToFieldType) ||
                       !std::numeric_limits<ToFieldType>::is_signed) {
             if constexpr (std::numeric_limits<ToFieldType>::is_signed) {
-                if (converted_value < std::numeric_limits<ToFieldType>::min() ||
-                    converted_value > std::numeric_limits<ToFieldType>::max()) {
+                if (converted_value < std::numeric_limits<ToFieldType>::min()) {
+                    LOG(WARNING) << "Decimal convert overflow";
+                    return std::numeric_limits<ToFieldType>::min();
+                }
+                if (converted_value > std::numeric_limits<ToFieldType>::max()) {
                     LOG(WARNING) << "Decimal convert overflow";
+                    return std::numeric_limits<ToFieldType>::max();
                 }
             } else {
                 using CastIntType =
@@ -385,6 +396,7 @@ convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale
                     converted_value >
                             static_cast<CastIntType>(std::numeric_limits<ToFieldType>::max())) {
                     LOG(WARNING) << "Decimal convert overflow";
+                    return std::numeric_limits<ToFieldType>::max();
                 }
             }
         }
@@ -402,13 +414,19 @@ convert_to_decimal(const typename FromDataType::FieldType& value, UInt32 scale)
     if constexpr (std::is_floating_point_v<FromFieldType>) {
         if (!std::isfinite(value)) {
             LOG(WARNING) << "Decimal convert overflow. Cannot convert infinity or NaN to decimal";
+            return value < 0 ? std::numeric_limits<ToNativeType>::min()
+                             : std::numeric_limits<ToNativeType>::max();
         }
 
         FromFieldType out;
         out = value * ToDataType::get_scale_multiplier(scale);
-        if (out <= static_cast<FromFieldType>(std::numeric_limits<ToNativeType>::min()) ||
-            out >= static_cast<FromFieldType>(std::numeric_limits<ToNativeType>::max())) {
+        if (out <= static_cast<FromFieldType>(std::numeric_limits<ToNativeType>::min())) {
             LOG(WARNING) << "Decimal convert overflow. Float is out of Decimal range";
+            return std::numeric_limits<ToNativeType>::min();
+        }
+        if (out >= static_cast<FromFieldType>(std::numeric_limits<ToNativeType>::max())) {
+            LOG(WARNING) << "Decimal convert overflow. Float is out of Decimal range";
+            return std::numeric_limits<ToNativeType>::max();
         }
         return out;
     } else {
@@ -421,9 +439,6 @@ convert_to_decimal(const typename FromDataType::FieldType& value, UInt32 scale)
     }
 }
 
-template <typename T>
-void convert_to_decimal(T* from_value, T* to_value, int32_t from_scale, int32_t to_scale,
-                        bool* loss_accuracy);
 template <typename T>
 typename T::NativeType max_decimal_value(UInt32 precision);
 
diff --git a/be/src/vec/exec/scan/vscan_node.cpp b/be/src/vec/exec/scan/vscan_node.cpp
index cda9cb6197..870e81d1ed 100644
--- a/be/src/vec/exec/scan/vscan_node.cpp
+++ b/be/src/vec/exec/scan/vscan_node.cpp
@@ -544,7 +544,9 @@ bool VScanNode::_is_predicate_acting_on_slot(
     }
     *slot_desc = entry->second.first;
     DCHECK(child_contains_slot != nullptr);
-    if (child_contains_slot->type().type != (*slot_desc)->type().type) {
+    if (child_contains_slot->type().type != (*slot_desc)->type().type ||
+        child_contains_slot->type().precision != (*slot_desc)->type().precision ||
+        child_contains_slot->type().scale != (*slot_desc)->type().scale) {
         if (!ignore_cast(*slot_desc, child_contains_slot)) {
             // the type of predicate not match the slot's type
             return false;
diff --git a/be/src/vec/io/io_helper.h b/be/src/vec/io/io_helper.h
index 0da73a5416..990b67fd62 100644
--- a/be/src/vec/io/io_helper.h
+++ b/be/src/vec/io/io_helper.h
@@ -71,7 +71,9 @@ template <typename T>
 void write_text(Decimal<T> value, UInt32 scale, std::ostream& ostr) {
     if (value < Decimal<T>(0)) {
         value *= Decimal<T>(-1);
-        ostr << '-';
+        if (value > Decimal<T>(0)) {
+            ostr << '-';
+        }
     }
 
     using Type = std::conditional_t<std::is_same_v<T, Int128I>, int128_t, T>;
@@ -88,7 +90,16 @@ void write_text(Decimal<T> value, UInt32 scale, std::ostream& ostr) {
     if (scale) {
         ostr << '.';
         String str_fractional(scale, '0');
-        for (Int32 pos = scale - 1; pos >= 0; --pos, value /= 10) {
+        Int32 pos = scale - 1;
+        if (value < Decimal<T>(0) && pos >= 0) {
+            // Reach here iff this value is a min value of a signed numeric type. It means min<int>()
+            // which is -2147483648 multiply -1 is still -2147483648.
+            str_fractional[pos] += (value / 10 * 10) - value;
+            pos--;
+            value /= 10;
+            value *= Decimal<T>(-1);
+        }
+        for (; pos >= 0; --pos, value /= 10) {
             str_fractional[pos] += value % 10;
         }
         ostr.write(str_fractional.data(), scale);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
index 29f76a471c..02e7b6a979 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
@@ -1157,6 +1157,10 @@ public class FunctionCallExpr extends Expr {
             System.arraycopy(childTypes, 0, newChildTypes, 0, newChildTypes.length);
             fn = getBuiltinFunction(fnName.getFunction(), newChildTypes,
                     Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF);
+        } else if (STDDEV_FUNCTION_SET.contains(fnName.getFunction().toLowerCase()) && children.size() == 1
+                && collectChildReturnTypes()[0].isDecimalV3()) {
+            fn = getBuiltinFunction(fnName.getFunction(), new Type[] {Type.DOUBLE},
+                    Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF);
         } else {
             // now first find table function in table function sets
             if (isTableFnCall) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/TypeDef.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/TypeDef.java
index bf641f4db1..df00ef62b5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/TypeDef.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/TypeDef.java
@@ -177,7 +177,7 @@ public class TypeDef implements ParseNode {
                             "Scale of decimal must between 0 and 9." + " Scale was set to: " + scale + ".");
                 }
                 // scale < precision
-                if (scale >= precision) {
+                if (scale > precision) {
                     throw new AnalysisException("Scale of decimal must be smaller than precision."
                             + " Scale is " + scale + " and precision is " + precision);
                 }
@@ -196,7 +196,7 @@ public class TypeDef implements ParseNode {
                             "Scale of decimal must not be less than 0." + " Scale was set to: " + decimal32Scale + ".");
                 }
                 // scale < precision
-                if (decimal32Scale >= decimal32Precision) {
+                if (decimal32Scale > decimal32Precision) {
                     throw new AnalysisException("Scale of decimal must be smaller than precision."
                             + " Scale is " + decimal32Scale + " and precision is " + decimal32Precision);
                 }
@@ -215,7 +215,7 @@ public class TypeDef implements ParseNode {
                             "Scale of decimal must not be less than 0." + " Scale was set to: " + decimal64Scale + ".");
                 }
                 // scale < precision
-                if (decimal64Scale >= decimal64Precision) {
+                if (decimal64Scale > decimal64Precision) {
                     throw new AnalysisException("Scale of decimal must be smaller than precision."
                             + " Scale is " + decimal64Scale + " and precision is " + decimal64Precision);
                 }
@@ -234,7 +234,7 @@ public class TypeDef implements ParseNode {
                             + decimal128Scale + ".");
                 }
                 // scale < precision
-                if (decimal128Scale >= decimal128Precision) {
+                if (decimal128Scale > decimal128Precision) {
                     throw new AnalysisException("Scale of decimal must be smaller than precision."
                             + " Scale is " + decimal128Scale + " and precision is " + decimal128Precision);
                 }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
index 31b1893e7f..c28ed27bc3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
@@ -1218,7 +1218,7 @@ public class InternalCatalog implements CatalogIf<Database> {
                 } else if (resultType.isDecimalV2() && resultType.equals(ScalarType.DECIMALV2)) {
                     typeDef = new TypeDef(ScalarType.createDecimalType(27, 9));
                 } else if (resultType.isDecimalV3()) {
-                    typeDef = new TypeDef(ScalarType.createDecimalType(resultType.getPrecision(),
+                    typeDef = new TypeDef(ScalarType.createDecimalV3Type(resultType.getPrecision(),
                             ((ScalarType) resultType).getScalarScale()));
                 } else {
                     typeDef = new TypeDef(resultExpr.getType());
diff --git a/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out b/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out
index 266c5df0a7..070fd800bc 100644
--- a/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out
+++ b/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out
@@ -1,6 +1,6 @@
 -- This file is automatically generated. You should know what you did if you want to edit this
 -- !select_tb --
-1	2	4	8	50string	500varchar	c	65535varchar	0	123456789012345678.123456789	2013-12-01	1900-01-01T00:00	2013-12-01	1900-01-01T00:00	1900-01-01T00:00:00.111	1900-01-01T00:00:00.111111	1	2	4	8	50string	500varchar_replace	c	65535varchar	12345678901234.123456	123456789012345678.123456789	1900-01-01	1900-01-01	1900-01-01	1900-01-01T00:00	1900-01-01T00:00	1900-01-01T00:00	2013-12-01	2013-12-01	2013-12-01	1900-01-01T00:00	1900-01-01T00:00	1900-01-01T00:00	1900-01-01T00:00:00.111	1900-01-01T00:00: [...]
+1	2	4	8	50string	500varchar	c	65535varchar	0.000000	123456789012345678.123456789	111.1	11222323232.1	11345643534234231.1	2013-12-01	1900-01-01T00:00	2013-12-01	1900-01-01T00:00	1900-01-01T00:00:00.111	1900-01-01T00:00:00.111111	1	2	4	8	50string	500varchar_replace	c	65535varchar	12345678901234.123456	123456789012345678.123456789	111.1	11222323232.1	11345643534234231.1	1900-01-01	1900-01-01	1900-01-01	1900-01-01T00:00	1900-01-01T00:00	1900-01-01T00:00	2013-12-01	2013-12-01	2013-12-01	1900- [...]
 
 -- !desc_tb --
 tinyint_key	TINYINT	No	true	\N	
@@ -13,6 +13,9 @@ char_key	CHAR(1)	No	true	\N	BLOOM_FILTER
 character_most_key	VARCHAR(65533)	No	true	\N	BLOOM_FILTER
 decimal_key	DECIMAL(20,6)	No	true	\N	BLOOM_FILTER
 decimal_most_key	DECIMAL(27,9)	No	true	\N	BLOOM_FILTER
+decimal32_key	DECIMALV3(5,1)	No	true	\N	BLOOM_FILTER
+decimal64_key	DECIMALV3(14,1)	No	true	\N	BLOOM_FILTER
+decimal128_key	DECIMALV3(38,1)	No	true	\N	BLOOM_FILTER
 date_key	DATE	No	true	\N	BLOOM_FILTER
 datetime_key	DATETIME	No	true	\N	BLOOM_FILTER
 datev2_key	DATEV2	No	true	\N	BLOOM_FILTER
@@ -29,6 +32,9 @@ char_value	CHAR(1)	No	false	\N	REPLACE
 character_most_value	VARCHAR(65533)	No	false	\N	REPLACE
 decimal_value	DECIMAL(20,6)	No	false	\N	SUM
 decimal_most_value	DECIMAL(27,9)	No	false	\N	SUM
+decimal32_value	DECIMALV3(5,1)	No	false	\N	SUM
+decimal64_value	DECIMALV3(14,1)	No	false	\N	SUM
+decimal128_value	DECIMALV3(38,1)	No	false	\N	SUM
 date_value_max	DATE	No	false	\N	MAX
 date_value_replace	DATE	No	false	\N	REPLACE
 date_value_min	DATE	No	false	\N	MIN
diff --git a/regression-test/data/correctness_p0/test_select_variance_agg.out b/regression-test/data/correctness_p0/test_select_variance_agg.out
index 66ad4d8c9e..5360845d02 100644
--- a/regression-test/data/correctness_p0/test_select_variance_agg.out
+++ b/regression-test/data/correctness_p0/test_select_variance_agg.out
@@ -3,5 +3,14 @@
 31200.0
 
 -- !select_default2 --
-564.666666667
+564.666667
+
+-- !select_decimal32 --
+1.6674
+
+-- !select_decimal64 --
+1.3290205760164607E11
+
+-- !select_decimal128 --
+564.666667
 
diff --git a/regression-test/data/datatype_p0/decimalv3/test_agg_tab_decimalv3.out b/regression-test/data/datatype_p0/decimalv3/test_agg_tab_decimalv3.out
new file mode 100644
index 0000000000..11d9c99f11
--- /dev/null
+++ b/regression-test/data/datatype_p0/decimalv3/test_agg_tab_decimalv3.out
@@ -0,0 +1,84 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !select_all --
+\N	\N	\N	\N	\N	\N
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_pred_decimal32_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+
+-- !select_pred_decimal32_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+
+-- !select_pred_decimal32_value --
+
+-- !select_pred_decimal32_value --
+
+-- !select_pred_decimal64_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_pred_decimal64_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_pred_decimal64_value --
+
+-- !select_pred_decimal64_value --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_pred_decimal128_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_pred_decimal128_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_pred_decimal128_value --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+
+-- !select_pred_decimal128_value --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_between_pred_decimal32_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+
+-- !select_in_pred_decimal32_key1 --
+
+-- !select_in_pred_decimal32_key2 --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+
+-- !select_in_pred_decimal32_key3 --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+
+-- !select_between_pred_decimal64_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_in_pred_decimal64_key1 --
+
+-- !select_in_pred_decimal64_key2 --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_in_pred_decimal64_key3 --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_between_pred_decimal128_key --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_in_pred_decimal128_key1 --
+
+-- !select_in_pred_decimal128_key2 --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
+-- !select_in_pred_decimal128_key3 --
+1.10000	1.20000	1.30000	7.00000	1.34400	1.60000
+2.10000	1.20000	1.30000	4.20000	1.21000	1.23420
+
diff --git a/regression-test/data/datatype_p0/decimalv3/test_dup_tab_decimalv3.out b/regression-test/data/datatype_p0/decimalv3/test_dup_tab_decimalv3.out
new file mode 100644
index 0000000000..119ce2a68c
--- /dev/null
+++ b/regression-test/data/datatype_p0/decimalv3/test_dup_tab_decimalv3.out
@@ -0,0 +1,213 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !select_all --
+\N	\N	\N	\N	\N	\N
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal32_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal32_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal32_value --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal32_value --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal64_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal64_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal64_value --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal64_value --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal128_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal128_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal128_value --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_pred_decimal128_value --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_between_pred_decimal32_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_in_pred_decimal32_key1 --
+
+-- !select_in_pred_decimal32_key2 --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_in_pred_decimal32_key3 --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_between_pred_decimal64_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_in_pred_decimal64_key1 --
+
+-- !select_in_pred_decimal64_key2 --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_in_pred_decimal64_key3 --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_between_pred_decimal128_key --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_in_pred_decimal128_key1 --
+
+-- !select_in_pred_decimal128_key2 --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
+-- !select_in_pred_decimal128_key3 --
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+1.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+2.10000	1.20000	1.30000	1.40000	1.50000	1.60000
+
diff --git a/regression-test/data/datatype_p0/decimalv3/test_uniq_tab_decimalv3.out b/regression-test/data/datatype_p0/decimalv3/test_uniq_tab_decimalv3.out
new file mode 100644
index 0000000000..1595a8c5b5
--- /dev/null
+++ b/regression-test/data/datatype_p0/decimalv3/test_uniq_tab_decimalv3.out
@@ -0,0 +1,87 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !select_all --
+\N	\N	\N	\N	\N	\N
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal32_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+
+-- !select_pred_decimal32_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+
+-- !select_pred_decimal32_value --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal32_value --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal64_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal64_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal64_value --
+
+-- !select_pred_decimal64_value --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal128_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal128_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_pred_decimal128_value --
+
+-- !select_pred_decimal128_value --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_between_pred_decimal32_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+
+-- !select_in_pred_decimal32_key1 --
+
+-- !select_in_pred_decimal32_key2 --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+
+-- !select_in_pred_decimal32_key3 --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+
+-- !select_between_pred_decimal64_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_in_pred_decimal64_key1 --
+
+-- !select_in_pred_decimal64_key2 --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_in_pred_decimal64_key3 --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_between_pred_decimal128_key --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_in_pred_decimal128_key1 --
+
+-- !select_in_pred_decimal128_key2 --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
+-- !select_in_pred_decimal128_key3 --
+1.10000	1.20000	1.30000	1.40000	1.45600	1.34543
+2.10000	1.20000	1.30000	1.40000	1.21000	1.12300
+
diff --git a/regression-test/data/ddl_p0/test_ctas_decimalv3.out b/regression-test/data/ddl_p0/test_ctas_decimalv3.out
new file mode 100644
index 0000000000..c0f7a1e12a
--- /dev/null
+++ b/regression-test/data/ddl_p0/test_ctas_decimalv3.out
@@ -0,0 +1,13 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !select --
+1.1	1.20000	1.3	1.400000	1.500000	1.600000
+1.1	1.20000	1.3	1.400000	1.500000	1.600000
+2.1	2.20000	2.3	2.400000	2.500000	2.600000
+2.1	2.20000	2.3	2.400000	2.500000	2.600000
+
+-- !select --
+1.1	1.20000	1.3	1.400000	1.500000	1.600000
+1.1	1.20000	1.3	1.400000	1.500000	1.600000
+2.1	2.20000	2.3	2.400000	2.500000	2.600000
+2.1	2.20000	2.3	2.400000	2.500000	2.600000
+
diff --git a/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out b/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out
new file mode 100644
index 0000000000..1b9f52fd5e
--- /dev/null
+++ b/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out
@@ -0,0 +1,31 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !sql --
+0.11111111111111111111111111111111100000	11111111111111111111111111111.110	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	11111111111111111111111111111.110	\N	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	11111111111111111111111111111.110	\N	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	11111111111111111111111111111.110	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	11111111111111111111111111111.110	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	11111111111111111111111111111.1100000000	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	9223372036854775.807	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	-9223.372036854775808	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	-9223	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
+-- !sql --
+0.11111111111111111111111111111111100000	-2147.483648	0.11111111111111111111111111111111100000	11111111111111111111111111111.110
+
diff --git a/regression-test/suites/bloom_filter_p0/test_create_table_with_bloom_filter.groovy b/regression-test/suites/bloom_filter_p0/test_create_table_with_bloom_filter.groovy
index 09a6967684..c95b131d0e 100644
--- a/regression-test/suites/bloom_filter_p0/test_create_table_with_bloom_filter.groovy
+++ b/regression-test/suites/bloom_filter_p0/test_create_table_with_bloom_filter.groovy
@@ -28,8 +28,11 @@ suite("test_create_table_with_bloom_filter") {
             char_key CHAR NOT NULL, 
             character_most_key VARCHAR(65533) NOT NULL, 
             decimal_key DECIMAL(20, 6) NOT NULL, 
-            decimal_most_key DECIMAL(27, 9) NOT NULL, 
-            date_key DATE NOT NULL, 
+            decimal_most_key DECIMAL(27, 9) NOT NULL,
+            decimal32_key DECIMALV3(5, 1) NOT NULL,
+            decimal64_key DECIMALV3(14, 1) NOT NULL,
+            decimal128_key DECIMALV3(38, 1) NOT NULL,
+            date_key DATE NOT NULL,
             datetime_key DATETIME NOT NULL,
             datev2_key DATEV2 NOT NULL,
             datetimev2_key_1 DATETIMEV2 NOT NULL,
@@ -44,7 +47,10 @@ suite("test_create_table_with_bloom_filter") {
             char_value CHAR REPLACE NOT NULL, 
             character_most_value VARCHAR(65533) REPLACE NOT NULL, 
             decimal_value DECIMAL(20, 6) SUM NOT NULL, 
-            decimal_most_value DECIMAL(27, 9) SUM NOT NULL, 
+            decimal_most_value DECIMAL(27, 9) SUM NOT NULL,
+            decimal32_value DECIMALV3(5, 1) SUM NOT NULL,
+            decimal64_value DECIMALV3(14, 1) SUM NOT NULL,
+            decimal128_value DECIMALV3(38, 1) SUM NOT NULL,
             date_value_max DATE MAX NOT NULL, 
             date_value_replace DATE REPLACE NOT NULL, 
             date_value_min DATE MIN NOT NULL, 
@@ -76,6 +82,9 @@ suite("test_create_table_with_bloom_filter") {
             character_most_key,
             decimal_key,
             decimal_most_key,
+            decimal32_key,
+            decimal64_key,
+            decimal128_key,
             date_key,
             datetime_key,
             datev2_key,
@@ -85,19 +94,21 @@ suite("test_create_table_with_bloom_filter") {
         DISTRIBUTED BY HASH(tinyint_key) BUCKETS 5 
         PROPERTIES ( 
             "bloom_filter_columns"="smallint_key,int_key,bigint_key,char_50_key,character_key,
-                                    char_key,character_most_key,decimal_key,decimal_most_key,
-                                    date_key,datetime_key,datev2_key, datetimev2_key_1, datetimev2_key_2, datetimev2_key_3",
+                                    char_key,character_most_key,decimal_key,decimal_most_key, decimal32_key,
+                                    decimal64_key, decimal128_key, date_key,datetime_key,datev2_key, datetimev2_key_1,
+                                    datetimev2_key_2, datetimev2_key_3",
             "replication_num" = "1"
         )
         """
     sql """
             INSERT INTO test_bloom_filter VALUES 
                 ('1', '2', '4', '8', '50string', '500varchar', 'c', '65535varchar', 
-                 '0', '123456789012345678.123456789', '2013-12-01', '1900-01-01 00:00:00',
+                 '0', '123456789012345678.123456789', '111.1', '11222323232.1', '11345643534234231.1',
+                 '2013-12-01', '1900-01-01 00:00:00',
                  '2013-12-01', '1900-01-01 00:00:00.111111',
                  '1900-01-01 00:00:00.111111', '1900-01-01 00:00:00.111111',
                  '1', '2', '4', '8', '50string', '500varchar_replace',
-                 'c', '65535varchar', '12345678901234.123456', '123456789012345678.123456789',
+                 'c', '65535varchar', '12345678901234.123456', '123456789012345678.123456789', '111.1', '11222323232.1', '11345643534234231.1',
                  '1900-01-01', '1900-01-01', '1900-01-01', '1900-01-01 00:00:00', '1900-01-01 00:00:00',
                  '1900-01-01 00:00:00', '2013-12-01', '2013-12-01', '2013-12-01', '1900-01-01 00:00:00.111111',
                  '1900-01-01 00:00:00.111111', '1900-01-01 00:00:00.111111', '1900-01-01 00:00:00.111111',
diff --git a/regression-test/suites/correctness_p0/test_select_variance_agg.groovy b/regression-test/suites/correctness_p0/test_select_variance_agg.groovy
index f07898c23e..190ac65e2d 100644
--- a/regression-test/suites/correctness_p0/test_select_variance_agg.groovy
+++ b/regression-test/suites/correctness_p0/test_select_variance_agg.groovy
@@ -21,15 +21,15 @@
 
      sql """ DROP TABLE IF EXISTS ${tableName} """
      sql """
-         CREATE TABLE IF NOT EXISTS ${tableName} ( `aa` int NULL COMMENT "", `bb` decimal(27,9) NULL COMMENT "" ) 
+         CREATE TABLE IF NOT EXISTS ${tableName} ( `aa` int NULL COMMENT "", `bb` decimal(27,9), `decimal32_col` decimalv3(5,2), `decimal64_col` decimalv3(15,9), `decimal128_col` decimal(27,9) NULL COMMENT "" )
          ENGINE=OLAP UNIQUE KEY(`aa`) DISTRIBUTED BY HASH(`aa`) BUCKETS 3 
          PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2" );
      """
 
      sql """ INSERT INTO ${tableName} VALUES 
-         (123,34),
-         (423,78),
-         (3,23); """
+         (123,34, 1.22,6666.6666,34),
+         (423,78,2.33,777777.7777,78),
+         (3,23,4.34,2222.2222,23); """
 
      // test_vectorized
      sql """ set enable_vectorized_engine = true; """
@@ -39,5 +39,8 @@
      // doris decimal variance implementation have deviation,
      // use round to check result
      qt_select_default2 """ select round(variance(bb), 6) from ${tableName}; """
+     qt_select_decimal32 """ select round(variance(decimal32_col), 6) from ${tableName}; """
+     qt_select_decimal64 """ select round(variance(decimal64_col), 6) from ${tableName}; """
+     qt_select_decimal128 """ select round(variance(decimal128_col), 6) from ${tableName}; """
 
  }
\ No newline at end of file
diff --git a/regression-test/suites/datatype_p0/decimalv3/test_agg_tab_decimalv3.groovy b/regression-test/suites/datatype_p0/decimalv3/test_agg_tab_decimalv3.groovy
new file mode 100644
index 0000000000..1869e19373
--- /dev/null
+++ b/regression-test/suites/datatype_p0/decimalv3/test_agg_tab_decimalv3.groovy
@@ -0,0 +1,91 @@
+// 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.
+
+suite("test_agg_tab_decimalv3") {
+
+    def table1 = "test_agg_tab_decimalv3"
+
+    sql "drop table if exists ${table1}"
+
+    sql """
+    CREATE TABLE IF NOT EXISTS `${table1}` (
+      `decimal32_key` decimalv3(8, 5) NULL COMMENT "",
+      `decimal64_key` decimalv3(16, 5) NULL COMMENT "",
+      `decimal128_key` decimalv3(38, 5) NULL COMMENT "",
+      `decimal32_value` decimalv3(8, 5) SUM NULL COMMENT "",
+      `decimal64_value` decimalv3(16, 5) MIN NULL COMMENT "",
+      `decimal128_value` decimalv3(38, 5) MAX NULL COMMENT ""
+    ) ENGINE=OLAP
+    AGGREGATE KEY(`decimal32_key`, `decimal64_key`, `decimal128_key`)
+    COMMENT "OLAP"
+    DISTRIBUTED BY HASH(`decimal32_key`, `decimal64_key`, `decimal128_key`) BUCKETS 8
+    PROPERTIES (
+    "replication_allocation" = "tag.location.default: 1",
+    "in_memory" = "false",
+    "storage_format" = "V2"
+    )
+    """
+    sql "set enable_vectorized_engine = true"
+
+    sql """insert into ${table1} values(1.1,1.2,1.3,1.4,1.5,1.6),
+            (1.1,1.2,1.3,1.4,1.56,1.234),
+            (1.1,1.2,1.3,1.4,1.66,1.534654),
+            (1.1,1.2,1.3,1.4,1.344,1.32432),
+            (1.1,1.2,1.3,1.4,1.456,1.345435),
+            (2.1,1.2,1.3,1.4,1.5,1.234),
+            (2.1,1.2,1.3,1.4,1.66,1.2342),
+            (2.1,1.2,1.3,1.4,1.21,1.123),
+            (NULL, NULL, NULL, NULL, NULL, NULL)
+    """
+    qt_select_all "select * from ${table1} order by decimal32_key"
+
+    qt_select_pred_decimal32_key "select * from ${table1} where decimal32_key = 1.1 order by decimal32_key"
+    qt_select_pred_decimal32_key "select * from ${table1} where decimal32_key < 1.1111111111111111111 order by decimal32_key"
+
+    qt_select_pred_decimal32_value "select * from ${table1} where decimal32_value = 1.4 order by decimal32_key"
+    qt_select_pred_decimal32_value "select * from ${table1} where decimal32_value < 1.444444444444444 order by decimal32_key"
+
+    qt_select_pred_decimal64_key "select * from ${table1} where decimal64_key = 1.2 order by decimal32_key"
+    qt_select_pred_decimal64_key "select * from ${table1} where decimal64_key < 1.222222222222222222 order by decimal32_key"
+
+    qt_select_pred_decimal64_value "select * from ${table1} where decimal64_value = 1.5 order by decimal32_key"
+    qt_select_pred_decimal64_value "select * from ${table1} where decimal64_value < 1.5555555555555555 order by decimal32_key"
+
+    qt_select_pred_decimal128_key "select * from ${table1} where decimal128_key = 1.3 order by decimal32_key"
+    qt_select_pred_decimal128_key "select * from ${table1} where decimal128_key < 1.333333333333 order by decimal32_key"
+
+    qt_select_pred_decimal128_value "select * from ${table1} where decimal128_value = 1.6 order by decimal32_key"
+    qt_select_pred_decimal128_value "select * from ${table1} where decimal128_value < 1.666666666666 order by decimal32_key"
+
+
+    qt_select_between_pred_decimal32_key "select * from ${table1} where decimal32_key between 1.0991 and 1.1111 order by decimal32_key"
+    qt_select_in_pred_decimal32_key1 "select * from ${table1} where decimal32_key in(1.1111) order by decimal32_key"
+    qt_select_in_pred_decimal32_key2 "select * from ${table1} where decimal32_key in(1.10000000000) order by decimal32_key"
+    qt_select_in_pred_decimal32_key3 "select * from ${table1} where decimal32_key in(1.1, 1.4) order by decimal32_key"
+
+    qt_select_between_pred_decimal64_key "select * from ${table1} where decimal64_key between 1.1991 and 1.2111 order by decimal32_key"
+    qt_select_in_pred_decimal64_key1 "select * from ${table1} where decimal64_key in(1.2111) order by decimal32_key"
+    qt_select_in_pred_decimal64_key2 "select * from ${table1} where decimal64_key in(1.20000000000) order by decimal32_key"
+    qt_select_in_pred_decimal64_key3 "select * from ${table1} where decimal64_key in(1.2, 1.4) order by decimal32_key"
+
+    qt_select_between_pred_decimal128_key "select * from ${table1} where decimal128_key between 1.2991 and 1.3111 order by decimal32_key"
+    qt_select_in_pred_decimal128_key1 "select * from ${table1} where decimal128_key in(1.3111) order by decimal32_key"
+    qt_select_in_pred_decimal128_key2 "select * from ${table1} where decimal128_key in(1.30000000000) order by decimal32_key"
+    qt_select_in_pred_decimal128_key3 "select * from ${table1} where decimal128_key in(1.3, 1.4) order by decimal32_key"
+
+    sql "drop table if exists ${table1}"
+}
diff --git a/regression-test/suites/datatype_p0/decimalv3/test_dup_tab_decimalv3.groovy b/regression-test/suites/datatype_p0/decimalv3/test_dup_tab_decimalv3.groovy
new file mode 100644
index 0000000000..fa4842fb4a
--- /dev/null
+++ b/regression-test/suites/datatype_p0/decimalv3/test_dup_tab_decimalv3.groovy
@@ -0,0 +1,91 @@
+// 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.
+
+suite("test_dup_tab_decimalv3") {
+
+    def table1 = "test_dup_tab_decimalv3"
+
+    sql "drop table if exists ${table1}"
+
+    sql """
+    CREATE TABLE IF NOT EXISTS `${table1}` (
+      `decimal32_key` decimalv3(8, 5) NULL COMMENT "",
+      `decimal64_key` decimalv3(16, 5) NULL COMMENT "",
+      `decimal128_key` decimalv3(38, 5) NULL COMMENT "",
+      `decimal32_value` decimalv3(8, 5) NULL COMMENT "",
+      `decimal64_value` decimalv3(16, 5) NULL COMMENT "",
+      `decimal128_value` decimalv3(38, 5) NULL COMMENT ""
+    ) ENGINE=OLAP
+    DUPLICATE KEY(`decimal32_key`, `decimal64_key`, `decimal128_key`)
+    COMMENT "OLAP"
+    DISTRIBUTED BY HASH(`decimal32_key`, `decimal64_key`, `decimal128_key`) BUCKETS 8
+    PROPERTIES (
+    "replication_allocation" = "tag.location.default: 1",
+    "in_memory" = "false",
+    "storage_format" = "V2"
+    )
+    """
+    sql "set enable_vectorized_engine = true"
+
+    sql """insert into ${table1} values(1.1,1.2,1.3,1.4,1.5,1.6),
+            (1.1,1.2,1.3,1.4,1.5,1.6),
+            (1.1,1.2,1.3,1.4,1.5,1.6),
+            (1.1,1.2,1.3,1.4,1.5,1.6),
+            (1.1,1.2,1.3,1.4,1.5,1.6),
+            (2.1,1.2,1.3,1.4,1.5,1.6),
+            (2.1,1.2,1.3,1.4,1.5,1.6),
+            (2.1,1.2,1.3,1.4,1.5,1.6),
+            (NULL, NULL, NULL, NULL, NULL, NULL)
+    """
+    qt_select_all "select * from ${table1} order by decimal32_key"
+
+    qt_select_pred_decimal32_key "select * from ${table1} where decimal32_key = 1.1 order by decimal32_key"
+    qt_select_pred_decimal32_key "select * from ${table1} where decimal32_key < 1.1111111111111111111 order by decimal32_key"
+
+    qt_select_pred_decimal32_value "select * from ${table1} where decimal32_value = 1.4 order by decimal32_key"
+    qt_select_pred_decimal32_value "select * from ${table1} where decimal32_value < 1.444444444444444 order by decimal32_key"
+
+    qt_select_pred_decimal64_key "select * from ${table1} where decimal64_key = 1.2 order by decimal32_key"
+    qt_select_pred_decimal64_key "select * from ${table1} where decimal64_key < 1.222222222222222222 order by decimal32_key"
+
+    qt_select_pred_decimal64_value "select * from ${table1} where decimal64_value = 1.5 order by decimal32_key"
+    qt_select_pred_decimal64_value "select * from ${table1} where decimal64_value < 1.5555555555555555 order by decimal32_key"
+
+    qt_select_pred_decimal128_key "select * from ${table1} where decimal128_key = 1.3 order by decimal32_key"
+    qt_select_pred_decimal128_key "select * from ${table1} where decimal128_key < 1.333333333333 order by decimal32_key"
+
+    qt_select_pred_decimal128_value "select * from ${table1} where decimal128_value = 1.6 order by decimal32_key"
+    qt_select_pred_decimal128_value "select * from ${table1} where decimal128_value < 1.666666666666 order by decimal32_key"
+
+
+    qt_select_between_pred_decimal32_key "select * from ${table1} where decimal32_key between 1.0991 and 1.1111 order by decimal32_key"
+    qt_select_in_pred_decimal32_key1 "select * from ${table1} where decimal32_key in(1.1111) order by decimal32_key"
+    qt_select_in_pred_decimal32_key2 "select * from ${table1} where decimal32_key in(1.10000000000) order by decimal32_key"
+    qt_select_in_pred_decimal32_key3 "select * from ${table1} where decimal32_key in(1.1, 1.4) order by decimal32_key"
+
+    qt_select_between_pred_decimal64_key "select * from ${table1} where decimal64_key between 1.1991 and 1.2111 order by decimal32_key"
+    qt_select_in_pred_decimal64_key1 "select * from ${table1} where decimal64_key in(1.2111) order by decimal32_key"
+    qt_select_in_pred_decimal64_key2 "select * from ${table1} where decimal64_key in(1.20000000000) order by decimal32_key"
+    qt_select_in_pred_decimal64_key3 "select * from ${table1} where decimal64_key in(1.2, 1.4) order by decimal32_key"
+
+    qt_select_between_pred_decimal128_key "select * from ${table1} where decimal128_key between 1.2991 and 1.3111 order by decimal32_key"
+    qt_select_in_pred_decimal128_key1 "select * from ${table1} where decimal128_key in(1.3111) order by decimal32_key"
+    qt_select_in_pred_decimal128_key2 "select * from ${table1} where decimal128_key in(1.30000000000) order by decimal32_key"
+    qt_select_in_pred_decimal128_key3 "select * from ${table1} where decimal128_key in(1.3, 1.4) order by decimal32_key"
+
+    sql "drop table if exists ${table1}"
+}
diff --git a/regression-test/suites/datatype_p0/decimalv3/test_uniq_tab_decimalv3.groovy b/regression-test/suites/datatype_p0/decimalv3/test_uniq_tab_decimalv3.groovy
new file mode 100644
index 0000000000..b810ee53f7
--- /dev/null
+++ b/regression-test/suites/datatype_p0/decimalv3/test_uniq_tab_decimalv3.groovy
@@ -0,0 +1,91 @@
+// 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.
+
+suite("test_uniq_tab_decimalv3") {
+
+    def table1 = "test_uniq_tab_decimalv3"
+
+    sql "drop table if exists ${table1}"
+
+    sql """
+    CREATE TABLE IF NOT EXISTS `${table1}` (
+      `decimal32_key` decimalv3(8, 5) NULL COMMENT "",
+      `decimal64_key` decimalv3(16, 5) NULL COMMENT "",
+      `decimal128_key` decimalv3(38, 5) NULL COMMENT "",
+      `decimal32_value` decimalv3(8, 5) NULL COMMENT "",
+      `decimal64_value` decimalv3(16, 5) NULL COMMENT "",
+      `decimal128_value` decimalv3(38, 5) NULL COMMENT ""
+    ) ENGINE=OLAP
+    UNIQUE KEY(`decimal32_key`, `decimal64_key`, `decimal128_key`)
+    COMMENT "OLAP"
+    DISTRIBUTED BY HASH(`decimal32_key`, `decimal64_key`, `decimal128_key`) BUCKETS 8
+    PROPERTIES (
+    "replication_allocation" = "tag.location.default: 1",
+    "in_memory" = "false",
+    "storage_format" = "V2"
+    )
+    """
+    sql "set enable_vectorized_engine = true"
+
+    sql """insert into ${table1} values(1.1,1.2,1.3,1.4,1.5,1.6),
+            (1.1,1.2,1.3,1.4,1.56,1.234),
+            (1.1,1.2,1.3,1.4,1.66,1.534654),
+            (1.1,1.2,1.3,1.4,1.344,1.32432),
+            (1.1,1.2,1.3,1.4,1.456,1.345435),
+            (2.1,1.2,1.3,1.4,1.5,1.234),
+            (2.1,1.2,1.3,1.4,1.66,1.2342),
+            (2.1,1.2,1.3,1.4,1.21,1.123),
+            (NULL, NULL, NULL, NULL, NULL, NULL)
+    """
+    qt_select_all "select * from ${table1} order by decimal32_key"
+
+    qt_select_pred_decimal32_key "select * from ${table1} where decimal32_key = 1.1 order by decimal32_key"
+    qt_select_pred_decimal32_key "select * from ${table1} where decimal32_key < 1.1111111111111111111 order by decimal32_key"
+
+    qt_select_pred_decimal32_value "select * from ${table1} where decimal32_value = 1.4 order by decimal32_key"
+    qt_select_pred_decimal32_value "select * from ${table1} where decimal32_value < 1.444444444444444 order by decimal32_key"
+
+    qt_select_pred_decimal64_key "select * from ${table1} where decimal64_key = 1.2 order by decimal32_key"
+    qt_select_pred_decimal64_key "select * from ${table1} where decimal64_key < 1.222222222222222222 order by decimal32_key"
+
+    qt_select_pred_decimal64_value "select * from ${table1} where decimal64_value = 1.5 order by decimal32_key"
+    qt_select_pred_decimal64_value "select * from ${table1} where decimal64_value < 1.5555555555555555 order by decimal32_key"
+
+    qt_select_pred_decimal128_key "select * from ${table1} where decimal128_key = 1.3 order by decimal32_key"
+    qt_select_pred_decimal128_key "select * from ${table1} where decimal128_key < 1.333333333333 order by decimal32_key"
+
+    qt_select_pred_decimal128_value "select * from ${table1} where decimal128_value = 1.6 order by decimal32_key"
+    qt_select_pred_decimal128_value "select * from ${table1} where decimal128_value < 1.666666666666 order by decimal32_key"
+
+
+    qt_select_between_pred_decimal32_key "select * from ${table1} where decimal32_key between 1.0991 and 1.1111 order by decimal32_key"
+    qt_select_in_pred_decimal32_key1 "select * from ${table1} where decimal32_key in(1.1111) order by decimal32_key"
+    qt_select_in_pred_decimal32_key2 "select * from ${table1} where decimal32_key in(1.10000000000) order by decimal32_key"
+    qt_select_in_pred_decimal32_key3 "select * from ${table1} where decimal32_key in(1.1, 1.4) order by decimal32_key"
+
+    qt_select_between_pred_decimal64_key "select * from ${table1} where decimal64_key between 1.1991 and 1.2111 order by decimal32_key"
+    qt_select_in_pred_decimal64_key1 "select * from ${table1} where decimal64_key in(1.2111) order by decimal32_key"
+    qt_select_in_pred_decimal64_key2 "select * from ${table1} where decimal64_key in(1.20000000000) order by decimal32_key"
+    qt_select_in_pred_decimal64_key3 "select * from ${table1} where decimal64_key in(1.2, 1.4) order by decimal32_key"
+
+    qt_select_between_pred_decimal128_key "select * from ${table1} where decimal128_key between 1.2991 and 1.3111 order by decimal32_key"
+    qt_select_in_pred_decimal128_key1 "select * from ${table1} where decimal128_key in(1.3111) order by decimal32_key"
+    qt_select_in_pred_decimal128_key2 "select * from ${table1} where decimal128_key in(1.30000000000) order by decimal32_key"
+    qt_select_in_pred_decimal128_key3 "select * from ${table1} where decimal128_key in(1.3, 1.4) order by decimal32_key"
+
+    sql "drop table if exists ${table1}"
+}
diff --git a/regression-test/suites/ddl_p0/test_ctas_decimalv3.groovy b/regression-test/suites/ddl_p0/test_ctas_decimalv3.groovy
new file mode 100644
index 0000000000..e359dfc7a5
--- /dev/null
+++ b/regression-test/suites/ddl_p0/test_ctas_decimalv3.groovy
@@ -0,0 +1,66 @@
+// 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.
+
+suite("test_ctas_decimalv3") {
+    def table1 = "test_uniq_tab_decimalv3"
+    def table2 = "test_uniq_tab_decimalv3_2"
+    try {
+        sql """
+    CREATE TABLE ${table1} (
+    c1 DECIMALV3(7,1) NULL,
+    c2 DECIMALV3(15,5) NULL,
+    c3 DECIMALV3(30,1) NULL,
+    v1 DECIMALV3(7,6) NULL COMMENT "",
+    v2 DECIMALV3(18,6) NULL COMMENT "",
+    v3 DECIMALV3(30,6) NULL COMMENT ""
+    ) ENGINE=OLAP
+    DUPLICATE KEY(c1,c2,c3)
+    COMMENT "OLAP"
+    DISTRIBUTED BY HASH(c1,c2,c3) BUCKETS 3
+      PROPERTIES (
+      "replication_allocation" = "tag.location.default: 1",
+      "in_memory" = "false",
+      "storage_format" = "V2"
+    )
+    """
+
+      sql """ insert into ${table1} values (1.1,1.2,1.3,1.4,1.5,1.6) """
+      sql """ insert into ${table1} values (2.1,2.2,2.3,2.4,2.5,2.6) """
+      sql """ insert into ${table1} values (1.1,1.2,1.3,1.4,1.5,1.6) """
+      sql """ insert into ${table1} values (2.1,2.2,2.3,2.4,2.5,2.6) """
+
+      qt_select """select * from ${table1} order by c1;"""
+      sql """
+    CREATE TABLE IF NOT EXISTS `${table2}`
+    PROPERTIES (
+      "replication_allocation" = "tag.location.default: 1",
+      "in_memory" = "false",
+      "storage_format" = "V2"
+    ) as select * from ${table1};
+    """
+
+      qt_select """select * from ${table2} order by c1;"""
+
+
+    } finally {
+        sql """ DROP TABLE IF EXISTS ${table1} """
+
+        sql """ DROP TABLE IF EXISTS ${table2} """
+    }
+
+}
+
diff --git a/regression-test/suites/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.groovy b/regression-test/suites/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.groovy
new file mode 100644
index 0000000000..7b3a4bfb6f
--- /dev/null
+++ b/regression-test/suites/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.groovy
@@ -0,0 +1,209 @@
+// 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.
+
+import org.codehaus.groovy.runtime.IOGroovyMethods
+
+suite("test_agg_keys_schema_change_decimalv3") {
+    def tbName = "test_agg_keys_schema_change_decimalv3"
+    def getJobState = { tableName ->
+         def jobStateResult = sql """  SHOW ALTER TABLE COLUMN WHERE IndexName='${tableName}' ORDER BY createtime DESC LIMIT 1 """
+         return jobStateResult[0][9]
+    }
+
+    String[][] backends = sql """ show backends; """
+    assertTrue(backends.size() > 0)
+    String backend_id;
+    def backendId_to_backendIP = [:]
+    def backendId_to_backendHttpPort = [:]
+    for (String[] backend in backends) {
+        backendId_to_backendIP.put(backend[0], backend[2])
+        backendId_to_backendHttpPort.put(backend[0], backend[5])
+    }
+
+    backend_id = backendId_to_backendIP.keySet()[0]
+    StringBuilder showConfigCommand = new StringBuilder();
+    showConfigCommand.append("curl -X GET http://")
+    showConfigCommand.append(backendId_to_backendIP.get(backend_id))
+    showConfigCommand.append(":")
+    showConfigCommand.append(backendId_to_backendHttpPort.get(backend_id))
+    showConfigCommand.append("/api/show_config")
+    logger.info(showConfigCommand.toString())
+    def process = showConfigCommand.toString().execute()
+    int code = process.waitFor()
+    String err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
+    String out = process.getText()
+    logger.info("Show config: code=" + code + ", out=" + out + ", err=" + err)
+    assertEquals(code, 0)
+    def configList = parseJson(out.trim())
+    assert configList instanceof List
+
+    def do_compact = { tableName ->
+        String[][] tablets = sql """ show tablets from ${tableName}; """
+        for (String[] tablet in tablets) {
+            String tablet_id = tablet[0]
+            backend_id = tablet[2]
+            logger.info("run compaction:" + tablet_id)
+            StringBuilder sb = new StringBuilder();
+            sb.append("curl -X POST http://")
+            sb.append(backendId_to_backendIP.get(backend_id))
+            sb.append(":")
+            sb.append(backendId_to_backendHttpPort.get(backend_id))
+            sb.append("/api/compaction/run?tablet_id=")
+            sb.append(tablet_id)
+            sb.append("&compact_type=cumulative")
+
+            String command = sb.toString()
+            process = command.execute()
+            code = process.waitFor()
+            err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
+            out = process.getText()
+            logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
+        }
+
+        // wait for all compactions done
+        for (String[] tablet in tablets) {
+            boolean running = true
+            do {
+                Thread.sleep(100)
+                String tablet_id = tablet[0]
+                backend_id = tablet[2]
+                StringBuilder sb = new StringBuilder();
+                sb.append("curl -X GET http://")
+                sb.append(backendId_to_backendIP.get(backend_id))
+                sb.append(":")
+                sb.append(backendId_to_backendHttpPort.get(backend_id))
+                sb.append("/api/compaction/run_status?tablet_id=")
+                sb.append(tablet_id)
+
+                String command = sb.toString()
+                process = command.execute()
+                code = process.waitFor()
+                err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream())));
+                out = process.getText()
+                logger.info("Get compaction status: code=" + code + ", out=" + out + ", err=" + err)
+                assertEquals(code, 0)
+                def compactionStatus = parseJson(out.trim())
+                assertEquals("success", compactionStatus.status.toLowerCase())
+                running = compactionStatus.run_status
+            } while (running)
+        }
+    }
+
+    sql """ DROP TABLE IF EXISTS ${tbName} FORCE"""
+    // Create table and disable light weight schema change
+    sql """
+           CREATE TABLE IF NOT EXISTS ${tbName}
+           (
+               `decimalv3k1` DECIMALV3(38,38),
+               `decimalv3k2` DECIMALV3(38,3),
+               `decimalv3v1` DECIMALV3(38,38) SUM,
+               `decimalv3v2` DECIMALV3(38,3) SUM
+           )
+           AGGREGATE  KEY(`decimalv3k1`,`decimalv3k2`)
+           DISTRIBUTED BY HASH(`decimalv3k1`) BUCKETS 1
+           PROPERTIES("replication_num" = "1", "light_schema_change" = "false");
+        """
+    sql """ insert into ${tbName} values(0.111111111111111111111111111111111,11111111111111111111111111111.11,0.111111111111111111111111111111111,11111111111111111111111111111.11);"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+
+    sql """ alter table ${tbName} add column `decimalv3v3` DECIMALV3(38,4) """
+    int max_try_time = 1000
+    while(max_try_time--){
+        String result = getJobState(tbName)
+        if (result == "FINISHED") {
+            break
+        } else {
+            sleep(100)
+            if (max_try_time < 1){
+                assertEquals(1,2)
+            }
+        }
+    }
+    sql """sync"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+    do_compact(tbName)
+    sql """sync"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+    sql """ alter table ${tbName} drop column `decimalv3v3` """
+    max_try_time = 1000
+    while(max_try_time--){
+        String result = getJobState(tbName)
+        if (result == "FINISHED") {
+            break
+        } else {
+            sleep(100)
+            if (max_try_time < 1){
+                assertEquals(1,2)
+            }
+        }
+    }
+
+    sql """sync"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+    sql """ alter table ${tbName} modify column decimalv3k2 DECIMALV3(19,3) key """
+    max_try_time = 1000
+    while(max_try_time--){
+        String result = getJobState(tbName)
+        if (result == "FINISHED") {
+            break
+        } else {
+            sleep(100)
+            if (max_try_time < 1){
+                assertEquals(1,2)
+            }
+        }
+    }
+
+    sql """sync"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+
+    sql """ alter table ${tbName} modify column decimalv3k2 DECIMALV3(38,10) key """
+    max_try_time = 1000
+    while(max_try_time--){
+        String result = getJobState(tbName)
+        if (result == "FINISHED") {
+            break
+        } else {
+            sleep(100)
+            if (max_try_time < 1){
+                assertEquals(1,2)
+            }
+        }
+    }
+
+    sql """sync"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+
+    sql """ alter table ${tbName} modify column decimalv3k2 DECIMALV3(16,3) key """
+    max_try_time = 1000
+    while(max_try_time--){
+        String result = getJobState(tbName)
+        if (result == "FINISHED") {
+            break
+        } else {
+            sleep(100)
+            if (max_try_time < 1){
+                assertEquals(1,2)
+            }
+        }
+    }
+
+    sql """sync"""
+    qt_sql """select /*+ SET_VAR(enable_vectorized_engine=true) */ * from ${tbName} ORDER BY `decimalv3k1`;"""
+
+    sql """ DROP TABLE ${tbName} FORCE """
+}


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