xinyiZzz commented on code in PR #48398:
URL: https://github.com/apache/doris/pull/48398#discussion_r1972745366


##########
be/src/vec/data_types/data_type_time_v2.h:
##########
@@ -123,7 +123,9 @@ class DataTypeDateTimeV2 final : public 
DataTypeNumberBase<UInt64> {
     DataTypeDateTimeV2(const DataTypeDateTimeV2& rhs) : _scale(rhs._scale) {}
     TypeIndex get_type_id() const override { return TypeIndex::DateTimeV2; }
     TypeDescriptor get_type_as_type_descriptor() const override {
-        return TypeDescriptor(TYPE_DATETIMEV2);
+        auto desc = TypeDescriptor(TYPE_DATETIMEV2);
+        desc.scale = _scale;

Review Comment:
   datetime不需要 precision,datetime 的 scale 是小数位数,即微秒的部分,即`2022-01-01 
01-01-01.123456` 中的 0.123456
   
   只有 decimal 和 datetime 用到了 scale



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

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


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

Reply via email to