Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4497d96
Add primitive row op trait for cleanup
PointKernel May 20, 2025
294a0c4
Cleanup
PointKernel May 20, 2025
4383fae
Add default hash seed to primitive row hasher
PointKernel May 20, 2025
9d9b50a
Add default hasher type
PointKernel May 20, 2025
99374f0
Move trait definition to CUDA file
PointKernel May 20, 2025
2957477
Apply primitive row ops in hash join
PointKernel May 20, 2025
238d5db
Minor nullate cleanups
PointKernel May 20, 2025
eb1bcbc
Cleanup to avoid duplicates
PointKernel May 20, 2025
37972ed
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel May 20, 2025
2336108
Minor cleanups
PointKernel May 20, 2025
bfb2794
push
PointKernel May 20, 2025
6d9db22
Add more explicit instantiations
PointKernel May 20, 2025
aa157cc
Fix build issues with instantiations
PointKernel May 21, 2025
2932948
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel May 27, 2025
33efc85
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel May 28, 2025
f534818
First version without build failures
PointKernel May 28, 2025
f0c3616
Add missing files
PointKernel May 28, 2025
19eaae1
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel May 29, 2025
c2b61be
Update python test: sort before equality check
PointKernel May 30, 2025
f41bf8e
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel May 30, 2025
6a66970
Fix a leftover in full join computation
PointKernel May 30, 2025
653f818
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel May 30, 2025
f92f5c9
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel Jun 2, 2025
4221d5a
Remove unrelated include
PointKernel Jun 2, 2025
0f59a62
Merge branch 'branch-25.08' into primitive-join
PointKernel Jun 4, 2025
b6ca2c2
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel Jun 5, 2025
71d7dc2
Update cpp/src/join/join_common_utils.cuh
PointKernel Jun 5, 2025
361d191
Rename for consistency
PointKernel Jun 5, 2025
a35101a
Renaming for consistency
PointKernel Jun 5, 2025
571286b
Merge remote-tracking branch 'origin/primitive-join' into primitive-join
PointKernel Jun 5, 2025
3da2070
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel Jun 9, 2025
eef1d01
Merge branch 'branch-25.08' into primitive-join
PointKernel Jun 16, 2025
aa1682b
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel Jun 17, 2025
ffd6265
Revert mixed join changes
PointKernel Jun 17, 2025
32e23c8
Remove primitive files
PointKernel Jun 17, 2025
dfb3fb1
Revert CMake changes
PointKernel Jun 17, 2025
ee29ba4
Cleanups
PointKernel Jun 17, 2025
c94bc66
Merge remote-tracking branch 'origin/primitive-join' into primitive-join
PointKernel Jun 17, 2025
6699013
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel Jun 17, 2025
127066e
Apply suggestions from code review
PointKernel Jun 17, 2025
bd26f5e
Update docs
PointKernel Jun 17, 2025
f240621
Merge remote-tracking branch 'origin/primitive-join' into primitive-join
PointKernel Jun 17, 2025
ea84493
Apply suggestions from code review
PointKernel Jun 18, 2025
43155a5
Merge remote-tracking branch 'upstream/branch-25.08' into primitive-join
PointKernel Jun 18, 2025
0d7273d
Merge remote-tracking branch 'origin/primitive-join' into primitive-join
PointKernel Jun 18, 2025
fe33a1b
Update docs
PointKernel Jun 18, 2025
c6c1749
Remove unused header
PointKernel Jun 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ add_library(
src/structs/structs_column_factories.cu
src/structs/structs_column_view.cpp
src/structs/utilities.cpp
src/table/primitive_row_operators.cu
src/table/row_operators.cu
src/table/table.cpp
src/table/table_device_view.cu
Expand Down
20 changes: 17 additions & 3 deletions cpp/include/cudf/table/primitive_row_operators.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
#include <cuda/std/type_traits>

namespace CUDF_EXPORT cudf {

/**
* @brief Checks if a table is compatible with primitive row operations
*
* A table is compatible with primitive row operations if it contains exactly one column
* and that column contains only numeric data types.
*
* @param table The table to check for compatibility
* @return Boolean indicating if the table is compatible with primitive row operations
*/
bool is_primitive_row_op_compatible(cudf::table_view const& table);

namespace row::primitive {

/**
Expand Down Expand Up @@ -177,7 +189,7 @@ class element_hasher {
*
* @tparam Hash Hash functor to use for hashing elements.
*/
template <template <typename> class Hash>
template <template <typename> class Hash = cudf::hashing::detail::default_hash>
class row_hasher {
public:
row_hasher() = delete;
Expand All @@ -189,7 +201,9 @@ class row_hasher {
* @param t A table_device_view to hash
* @param seed A seed value to use for hashing
*/
row_hasher(cudf::nullate::DYNAMIC const& has_nulls, table_device_view t, hash_value_type seed)
row_hasher(cudf::nullate::DYNAMIC const& has_nulls,
table_device_view t,
hash_value_type seed = DEFAULT_HASH_SEED)
: _has_nulls{has_nulls}, _table{t}, _seed{seed}
{
}
Expand All @@ -203,7 +217,7 @@ class row_hasher {
*/
row_hasher(cudf::nullate::DYNAMIC const& has_nulls,
std::shared_ptr<cudf::experimental::row::equality::preprocessed_table> t,
hash_value_type seed)
hash_value_type seed = DEFAULT_HASH_SEED)
: _has_nulls{has_nulls}, _table{*t}, _seed{seed}
{
}
Expand Down
20 changes: 10 additions & 10 deletions cpp/src/join/distinct_hash_join.cu
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool constexpr has_nulls = true; ///< Always has nulls
*/
template <typename T>
class primitive_keys_fn {
using hasher = cudf::row::primitive::row_hasher<cudf::hashing::detail::default_hash>;
using hasher = cudf::row::primitive::row_hasher<>;

public:
CUDF_HOST_DEVICE constexpr primitive_keys_fn(hasher const& hash) : _hash{hash} {}
Expand Down Expand Up @@ -207,9 +207,9 @@ distinct_hash_join::distinct_hash_join(cudf::table_view const& build,
}
};

if (_build.num_columns() == 1 and cudf::is_numeric(_build.column(0).type())) {
auto const d_hasher = cudf::row::primitive::row_hasher<cudf::hashing::detail::default_hash>{
nullate::DYNAMIC{has_nulls}, this->_preprocessed_build, DEFAULT_HASH_SEED};
if (cudf::is_primitive_row_op_compatible(_build)) {
auto const d_hasher =
cudf::row::primitive::row_hasher{nullate::DYNAMIC{has_nulls}, this->_preprocessed_build};

auto const iter = cudf::detail::make_counting_transform_iterator(
0, primitive_keys_fn<rhs_index_type>{d_hasher});
Expand Down Expand Up @@ -253,9 +253,9 @@ distinct_hash_join::inner_join(cudf::table_view const& probe,

auto preprocessed_probe =
cudf::experimental::row::equality::preprocessed_table::create(probe, stream);
if (_build.num_columns() == 1 and cudf::is_numeric(_build.column(0).type())) {
auto const d_hasher = cudf::row::primitive::row_hasher<cudf::hashing::detail::default_hash>{
nullate::DYNAMIC{has_nulls}, preprocessed_probe, DEFAULT_HASH_SEED};
if (cudf::is_primitive_row_op_compatible(_build)) {
auto const d_hasher =
cudf::row::primitive::row_hasher{nullate::DYNAMIC{has_nulls}, preprocessed_probe};
auto const d_equal = cudf::row::primitive::row_equality_comparator{
nullate::DYNAMIC{has_nulls}, preprocessed_probe, _preprocessed_build, _nulls_equal};
auto const iter = cudf::detail::make_counting_transform_iterator(
Expand Down Expand Up @@ -349,9 +349,9 @@ std::unique_ptr<rmm::device_uvector<size_type>> distinct_hash_join::left_join(
auto preprocessed_probe =
cudf::experimental::row::equality::preprocessed_table::create(probe, stream);

if (_build.num_columns() == 1 and cudf::is_numeric(_build.column(0).type())) {
auto const d_hasher = cudf::row::primitive::row_hasher<cudf::hashing::detail::default_hash>{
nullate::DYNAMIC{has_nulls}, preprocessed_probe, DEFAULT_HASH_SEED};
if (cudf::is_primitive_row_op_compatible(_build)) {
auto const d_hasher =
cudf::row::primitive::row_hasher{nullate::DYNAMIC{has_nulls}, preprocessed_probe};
auto const d_equal = cudf::row::primitive::row_equality_comparator{
nullate::DYNAMIC{has_nulls}, preprocessed_probe, _preprocessed_build, _nulls_equal};

Expand Down
Loading