Skip to content

Commit

Permalink
Merge branch 'branch-25.02' into custom_getitem
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar authored Jan 14, 2025
2 parents 3aee3b4 + 8470291 commit 001498a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 3 additions & 1 deletion java/src/main/java/ai/rapids/cudf/HostUDFWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
* <p>
* A new host UDF aggregation implementation must extend this class and override the
* {@code hashCode} and {@code equals} methods for such purposes.
* In addition, since this class implements {@code AutoCloseable}, the {@code close} method must
* also be overridden to automatically delete the native UDF instance upon class destruction.
*/
public abstract class HostUDFWrapper {
public abstract class HostUDFWrapper implements AutoCloseable {
public final long udfNativeHandle;

public HostUDFWrapper(long udfNativeHandle) {
Expand Down
4 changes: 4 additions & 0 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,11 @@ def as_column(
and pa.types.is_integer(arbitrary.type)
and arbitrary.null_count > 0
):
# TODO: Need to re-visit this cast and fill_null
# calls while addressing the following issue:
# https://github.com/rapidsai/cudf/issues/14149
arbitrary = arbitrary.cast(pa.float64())
arbitrary = pc.fill_null(arbitrary, np.nan)
if (
cudf.get_option("default_integer_bitwidth")
and pa.types.is_integer(arbitrary.type)
Expand Down
11 changes: 10 additions & 1 deletion python/cudf/cudf/tests/test_series.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
# Copyright (c) 2020-2025, NVIDIA CORPORATION.
import datetime
import decimal
import hashlib
Expand Down Expand Up @@ -3003,3 +3003,12 @@ def test_dtype_dtypes_equal():
ser = cudf.Series([0])
assert ser.dtype is ser.dtypes
assert ser.dtypes is ser.to_pandas().dtypes


def test_null_like_to_nan_pandas_compat():
with cudf.option_context("mode.pandas_compatible", True):
ser = cudf.Series([1, 2, np.nan, 10, None])
pser = pd.Series([1, 2, np.nan, 10, None])

assert pser.dtype == ser.dtype
assert_eq(ser, pser)

0 comments on commit 001498a

Please sign in to comment.