Gabriel39 commented on code in PR #9582:
URL: https://github.com/apache/incubator-doris/pull/9582#discussion_r882367320


##########
be/src/olap/field.h:
##########
@@ -298,6 +298,11 @@ class Field {
     Field* get_sub_field(int i) const { return _sub_fields[i].get(); }
     size_t get_sub_field_count() const { return _sub_fields.size(); }
 
+    void set_precision(int32_t precision) { _precision = precision; }
+    void set_frac(int32_t frac) { _frac = frac; }
+    int32_t precision() const { return _precision; }
+    int32_t frac() const { return _frac; }

Review Comment:
   I also think `frac` is a little confused for decimal. To keep semantics for 
decimal, it's better to use `scale` here.



##########
be/src/vec/olap/olap_data_convertor.h:
##########
@@ -164,6 +165,45 @@ class OlapBlockDataConvertor {
         PaddedPODArray<decimal12_t> _values;

Review Comment:
   We should use different types to store value for different decimal precision



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