Skip to content

Commit

Permalink
Fix a leftover _has_nulls change from Nullate (#10211)
Browse files Browse the repository at this point in the history
There was one missed change from template param has_nulls to member Nullate _has_nulls. It worked because has_nulls resolved to pointer to the function `has_nulls(table_view)` which is always true and didn't break at runtime because the subsequent is_null has a built in nullmask check.

Authors:
  - Devavret Makkar (https://github.com/devavret)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Ram (Ramakrishna Prabhu) (https://github.com/rgsl888prabhu)
  - Mike Wilson (https://github.com/hyperbolic2346)

URL: #10211
  • Loading branch information
devavret authored Feb 4, 2022
1 parent 4e8cb4f commit 5024a0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/include/cudf/table/row_operators.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -233,7 +233,7 @@ class row_equality_comparator {
row_equality_comparator(Nullate has_nulls,
table_device_view lhs,
table_device_view rhs,
null_equality nulls_are_equal = true)
null_equality nulls_are_equal = null_equality::EQUAL)
: lhs{lhs}, rhs{rhs}, nulls{has_nulls}, nulls_are_equal{nulls_are_equal}
{
CUDF_EXPECTS(lhs.num_columns() == rhs.num_columns(), "Mismatched number of columns.");
Expand Down Expand Up @@ -465,7 +465,7 @@ class element_hasher_with_seed {
template <typename T, CUDF_ENABLE_IF(column_device_view::has_element_accessor<T>())>
__device__ hash_value_type operator()(column_device_view col, size_type row_index) const
{
if (has_nulls && col.is_null(row_index)) { return _null_hash; }
if (_has_nulls && col.is_null(row_index)) { return _null_hash; }
return hash_function<T>{_seed}(col.element<T>(row_index));
}

Expand Down

0 comments on commit 5024a0a

Please sign in to comment.