yiguolei commented on code in PR #19351:
URL: https://github.com/apache/doris/pull/19351#discussion_r1187319395


##########
be/src/vec/data_types/data_type_decimal.h:
##########
@@ -206,6 +206,32 @@ class DataTypeDecimal final : public IDataType {
     void to_pb_column_meta(PColumnMeta* col_meta) const override;
 
     Field get_default() const override;
+
+    Field get_field(const TExprNode& node) const override {
+        DCHECK_EQ(node.node_type, TExprNodeType::DECIMAL_LITERAL);
+        DCHECK(node.__isset.decimal_literal);
+        // decimalv2
+        if constexpr (std::is_same_v<TypeId<T>, TypeId<Decimal128>>) {

Review Comment:
   do not use is_same_v to check if it is decimalv2.
   data type ptr has a method TypeIndex get_type_id() const override { return 
TypeId<T>::value; } it will return the type clearly. 



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