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

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

commit 3ec4249cc9f88e2f7fc62cb541dd8813e17b37ad
Author: dataroaring <[email protected]>
AuthorDate: Thu Mar 31 12:32:49 2022 +0800

    [refactor] comment code converting decimal format (#8708)
    
    The comment can help newbies read code much more quickly.
---
 be/src/exec/olap_scanner.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/be/src/exec/olap_scanner.cpp b/be/src/exec/olap_scanner.cpp
index 6db7774..04dfa81 100644
--- a/be/src/exec/olap_scanner.cpp
+++ b/be/src/exec/olap_scanner.cpp
@@ -467,6 +467,9 @@ void OlapScanner::_convert_row_to_tuple(Tuple* tuple) {
             DecimalV2Value* slot = 
tuple->get_decimalv2_slot(slot_desc->tuple_offset());
             auto packed_decimal = *reinterpret_cast<const decimal12_t*>(ptr);
 
+            // We convert the format for storage to the format for computation.
+            // Coding coverting in the opposite direction is in 
AggregateFuncTraits
+            // for decimal.
             int64_t int_value = packed_decimal.integer;
             int32_t frac_value = packed_decimal.fraction;
             if (!slot->from_olap_decimal(int_value, frac_value)) {

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

Reply via email to