You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/07 03:42:07 UTC

[GitHub] [doris] HappenLee opened a new pull request, #12407: [Opt](vectorized) Speed up bucket shuffle join hash compute

HappenLee opened a new pull request, #12407:
URL: https://github.com/apache/doris/pull/12407

   # Proposed changes
   
   Do same opt work as #12334 in crc32 hash compute to speed up hash compute 
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


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

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


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


[GitHub] [doris] Gabriel39 commented on a diff in pull request #12407: [Opt](vectorized) Speed up bucket shuffle join hash compute

Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #12407:
URL: https://github.com/apache/doris/pull/12407#discussion_r965006837


##########
be/src/runtime/raw_value.h:
##########
@@ -458,21 +460,6 @@ inline uint32_t RawValue::zlib_crc32(const void* v, const TypeDescriptor& type,
         int len = date_val->to_buffer(buf);
         return HashUtil::zlib_crc_hash(buf, len, seed);
     }
-    case TYPE_DATEV2: {
-        const vectorized::DateV2Value<doris::vectorized::DateV2ValueType>* date_v2_val =
-                (const vectorized::DateV2Value<doris::vectorized::DateV2ValueType>*)v;
-        char buf[64];
-        int len = date_v2_val->to_buffer(buf);
-        return HashUtil::zlib_crc_hash(buf, len, seed);
-    }
-
-    case TYPE_DATETIMEV2: {
-        const vectorized::DateV2Value<doris::vectorized::DateTimeV2ValueType>* date_v2_val =
-                (const vectorized::DateV2Value<doris::vectorized::DateTimeV2ValueType>*)v;
-        char buf[64];
-        int len = date_v2_val->to_buffer(buf);
-        return HashUtil::zlib_crc_hash(buf, len, seed);
-    }
 
     case TYPE_DECIMALV2: {

Review Comment:
   collapse `decimalv3` types with the integer types with the same length



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

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


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


[GitHub] [doris] Gabriel39 commented on a diff in pull request #12407: [Opt](vectorized) Speed up bucket shuffle join hash compute

Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #12407:
URL: https://github.com/apache/doris/pull/12407#discussion_r964670903


##########
be/src/vec/columns/column_nullable.cpp:
##########
@@ -67,6 +67,25 @@ void ColumnNullable::update_hashes_with_value(std::vector<SipHash>& hashes,
     }
 }
 
+void ColumnNullable::update_crcs_with_value(std::vector<uint32_t>& hashes,
+                                            doris::PrimitiveType type,
+                                            const uint8_t* __restrict null_data) const {
+    DCHECK(null_data == nullptr);
+    auto s = hashes.size();
+    DCHECK(s == size());
+    auto* __restrict real_null_data = assert_cast<const ColumnUInt8&>(*null_map).get_data().data();
+    if (doris::simd::count_zero_num(reinterpret_cast<const int8_t*>(real_null_data), s) == s) {

Review Comment:
   May be we can unify these two function `this->hash_null()` and `doris::simd::count_zero_num` ? I think it's better to use `!this->hash_null()` here.



##########
be/src/runtime/primitive_type.h:
##########
@@ -33,43 +34,6 @@ class DateTimeValue;
 class DecimalV2Value;
 struct StringValue;
 
-enum PrimitiveType {

Review Comment:
   Why delete this?



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

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


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


[GitHub] [doris] Gabriel39 merged pull request #12407: [Opt](vectorized) Speed up bucket shuffle join hash compute

Posted by GitBox <gi...@apache.org>.
Gabriel39 merged PR #12407:
URL: https://github.com/apache/doris/pull/12407


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

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


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