csun5285 commented on code in PR #63291:
URL: https://github.com/apache/doris/pull/63291#discussion_r3271668277


##########
be/src/core/column/column_dictionary.h:
##########
@@ -326,26 +318,13 @@ class ColumnDictI32 final : public COWHelper<IColumn, 
ColumnDictI32> {
             }
         }
 
-        inline uint32_t get_hash_value(Int32 code, FieldType type) const {
+        inline uint32_t get_hash_value(Int32 code) const {
             if (_compute_hash_value_flags[code]) {
                 return _hash_values[code];
             } else {
                 auto& sv = (*_dict_data)[code];
-                // The char data is stored in the disk with the schema length,
-                // and zeros are filled if the length is insufficient
-
-                // When reading data, use 
shrink_char_type_column_suffix_zero(_char_type_idx)
-                // Remove the suffix 0
-                // When writing data, use the CharField::consume function to 
fill in the trailing 0.
-
-                // For dictionary data of char type, sv.size is the schema 
length,
-                // so use strnlen to remove the 0 at the end to get the actual 
length.
-                size_t len = sv.size;
-                if (type == FieldType::OLAP_FIELD_TYPE_CHAR) {
-                    len = strnlen(sv.data, sv.size);
-                }
                 uint32_t hash_val =
-                        crc32c::Extend(0, (const uint8_t*)sv.data, 
static_cast<uint32_t>(len));
+                        crc32c::Extend(0, (const uint8_t*)sv.data, 
static_cast<uint32_t>(sv.size));

Review Comment:
   这个是计算 hash 值



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to