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/05/19 12:32:12 UTC

[GitHub] [incubator-doris] cambyzju commented on a diff in pull request #9688: [fix] group by with two NULL rows after left join

cambyzju commented on code in PR #9688:
URL: https://github.com/apache/incubator-doris/pull/9688#discussion_r876996911


##########
be/src/vec/columns/column_nullable.cpp:
##########
@@ -102,7 +102,10 @@ StringRef ColumnNullable::serialize_value_into_arena(size_t n, Arena& arena,
     static constexpr auto s = sizeof(arr[0]);
 
     auto pos = arena.alloc_continue(s, begin);
-    memcpy(pos, &arr[n], s);
+    // Value of `NULL` may be 1 or JOIN_NULL_HINT, we serialize both to 1.
+    // Because we need same key for both `NULL` values while processing `group by`.
+    UInt8* val = reinterpret_cast<UInt8*>(pos);
+    *val = (arr[n] ? 1 : 0);
 

Review Comment:
   done



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