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

dataroaring pushed a commit to branch branch-3.0.5
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0.5 by this push:
     new 9f88d8dfe04 [test](type) remove DCHECK of precision for datetime type 
(#52244)
9f88d8dfe04 is described below

commit 9f88d8dfe04ef11f9252fc724a45595dc9c2032c
Author: TengJianPing <[email protected]>
AuthorDate: Tue Jun 24 22:01:47 2025 +0800

    [test](type) remove DCHECK of precision for datetime type (#52244)
---
 be/src/runtime/types.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/be/src/runtime/types.cpp b/be/src/runtime/types.cpp
index 7b7154fb38a..c8f18cf65b6 100644
--- a/be/src/runtime/types.cpp
+++ b/be/src/runtime/types.cpp
@@ -47,7 +47,9 @@ TypeDescriptor::TypeDescriptor(const std::vector<TTypeNode>& 
types, int* idx)
             len = scalar_type.len;
         } else if (type == TYPE_DECIMALV2 || type == TYPE_DECIMAL32 || type == 
TYPE_DECIMAL64 ||
                    type == TYPE_DECIMAL128I || type == TYPE_DECIMAL256 || type 
== TYPE_DATETIMEV2) {
-            DCHECK(scalar_type.__isset.precision);
+            if (type != TYPE_DATETIMEV2) {
+                DCHECK(scalar_type.__isset.precision);
+            }
             DCHECK(scalar_type.__isset.scale);
             precision = scalar_type.precision;
             scale = scalar_type.scale;
@@ -225,7 +227,9 @@ TypeDescriptor::TypeDescriptor(const 
google::protobuf::RepeatedPtrField<PTypeNod
             len = scalar_type.len();
         } else if (type == TYPE_DECIMALV2 || type == TYPE_DECIMAL32 || type == 
TYPE_DECIMAL64 ||
                    type == TYPE_DECIMAL128I || type == TYPE_DECIMAL256 || type 
== TYPE_DATETIMEV2) {
-            DCHECK(scalar_type.has_precision());
+            if (type != TYPE_DATETIMEV2) {
+                DCHECK(scalar_type.has_precision());
+            }
             DCHECK(scalar_type.has_scale());
             precision = scalar_type.precision();
             scale = scalar_type.scale();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to