Skip to content

Commit

Permalink
Update src/main/cpp/src/hive_hash.cu
Browse files Browse the repository at this point in the history
Co-authored-by: Nghia Truong <[email protected]>
  • Loading branch information
ustcfy and ttnghia authored Nov 22, 2024
1 parent e7749c8 commit e50be83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/cpp/src/hive_hash.cu
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class hive_device_row_hasher {
* @brief Functor to compute the hive hash value for a nested column.
*
* This functor produces the same result as "HiveHash" in Spark for structs and lists.
* The pseudocode of Spark's HiveHash function for structs and lists is as follows:
* The pseudocode of Spark's HiveHash function for structs is as follows:
*
* hive_hash_value_t hive_hash(NestedType element) {
* hive_hash_value_t hash = HIVE_INIT_HASH;
Expand All @@ -256,6 +256,9 @@ class hive_device_row_hasher {
* return hash;
* }
*
* In the cases of lists, the hash value is computed by a similar way but we iterate through the list
* elements instead of through the child columns' elements.
*
* This functor uses a stack to simulate the recursive process of the above pseudocode.
* When an element is popped from the stack, it means that the hash value of it has been
* computed. Therefore, we should update the parent's `cur_hash` upon popping the element.
Expand Down

0 comments on commit e50be83

Please sign in to comment.