diff --git a/python/pylibcudf/pylibcudf/libcudf/aggregation.pxd b/python/pylibcudf/pylibcudf/libcudf/aggregation.pxd index 58c579b86de..52d1e572ff3 100644 --- a/python/pylibcudf/pylibcudf/libcudf/aggregation.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/aggregation.pxd @@ -5,6 +5,7 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport ( data_type, interpolation, @@ -94,71 +95,78 @@ cdef extern from "cudf/aggregation.hpp" namespace "cudf" nogil: ZERO_NORMALIZED ONE_NORMALIZED - cdef unique_ptr[T] make_sum_aggregation[T]() except + + cdef unique_ptr[T] make_sum_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_product_aggregation[T]() except + + cdef unique_ptr[T] make_product_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_min_aggregation[T]() except + + cdef unique_ptr[T] make_min_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_max_aggregation[T]() except + + cdef unique_ptr[T] make_max_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_count_aggregation[T](null_policy) except + + cdef unique_ptr[T] make_count_aggregation[T]( + null_policy + ) except +libcudf_exception_handler - cdef unique_ptr[T] make_any_aggregation[T]() except + + cdef unique_ptr[T] make_any_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_all_aggregation[T]() except + + cdef unique_ptr[T] make_all_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_sum_of_squares_aggregation[T]() except + + cdef unique_ptr[T] make_sum_of_squares_aggregation[T]()\ + except +libcudf_exception_handler - cdef unique_ptr[T] make_mean_aggregation[T]() except + + cdef unique_ptr[T] make_mean_aggregation[T]() except +libcudf_exception_handler cdef unique_ptr[T] make_variance_aggregation[T]( - size_type ddof) except + + size_type ddof) except +libcudf_exception_handler - cdef unique_ptr[T] make_std_aggregation[T](size_type ddof) except + + cdef unique_ptr[T] make_std_aggregation[T]( + size_type ddof + ) except +libcudf_exception_handler - cdef unique_ptr[T] make_median_aggregation[T]() except + + cdef unique_ptr[T] make_median_aggregation[T]() except +libcudf_exception_handler cdef unique_ptr[T] make_quantile_aggregation[T]( - vector[double] q, interpolation i) except + + vector[double] q, interpolation i) except +libcudf_exception_handler - cdef unique_ptr[T] make_argmax_aggregation[T]() except + + cdef unique_ptr[T] make_argmax_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_argmin_aggregation[T]() except + + cdef unique_ptr[T] make_argmin_aggregation[T]() except +libcudf_exception_handler - cdef unique_ptr[T] make_nunique_aggregation[T](null_policy null_handling) except + + cdef unique_ptr[T] make_nunique_aggregation[T]( + null_policy null_handling + ) except +libcudf_exception_handler cdef unique_ptr[T] make_nth_element_aggregation[T]( size_type n, null_policy null_handling - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[T] make_collect_list_aggregation[T]( null_policy null_handling - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[T] make_collect_set_aggregation[T]( null_policy null_handling, null_equality nulls_equal, nan_equality nans_equal - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[T] make_udf_aggregation[T]( udf_type type, string user_defined_aggregator, - data_type output_type) except + + data_type output_type) except +libcudf_exception_handler cdef unique_ptr[T] make_ewma_aggregation[T]( double com, ewm_history adjust - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[T] make_correlation_aggregation[T]( - correlation_type type, size_type min_periods) except + + correlation_type type, size_type min_periods) except +libcudf_exception_handler cdef unique_ptr[T] make_covariance_aggregation[T]( - size_type min_periods, size_type ddof) except + + size_type min_periods, size_type ddof) except +libcudf_exception_handler cdef unique_ptr[T] make_rank_aggregation[T]( rank_method method, order column_order, null_policy null_handling, null_order null_precedence, - rank_percentage percentage) except + + rank_percentage percentage) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/binaryop.pxd b/python/pylibcudf/pylibcudf/libcudf/binaryop.pxd index d39767b4aa8..607f7c2fa60 100644 --- a/python/pylibcudf/pylibcudf/libcudf/binaryop.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/binaryop.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr diff --git a/python/pylibcudf/pylibcudf/libcudf/column/column.pxd b/python/pylibcudf/pylibcudf/libcudf/column/column.pxd index 76f35cbba71..0f412ba4765 100644 --- a/python/pylibcudf/pylibcudf/libcudf/column/column.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/column/column.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, @@ -19,15 +19,15 @@ cdef extern from "cudf/column/column.hpp" namespace "cudf" nogil: vector[unique_ptr[column]] children cdef cppclass column: - column() except + - column(const column& other) except + + column() except +libcudf_exception_handler + column(const column& other) except +libcudf_exception_handler - column(column_view view) except + + column(column_view view) except +libcudf_exception_handler - size_type size() except + - size_type null_count() except + - bool has_nulls() except + - data_type type() except + - column_view view() except + - mutable_column_view mutable_view() except + - column_contents release() except + + size_type size() except +libcudf_exception_handler + size_type null_count() except +libcudf_exception_handler + bool has_nulls() except +libcudf_exception_handler + data_type type() except +libcudf_exception_handler + column_view view() except +libcudf_exception_handler + mutable_column_view mutable_view() except +libcudf_exception_handler + column_contents release() except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd b/python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd index b2388858127..162822d2365 100644 --- a/python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.scalar.scalar cimport scalar from pylibcudf.libcudf.types cimport ( @@ -15,68 +15,80 @@ from rmm.librmm.device_buffer cimport device_buffer cdef extern from "cudf/column/column_factories.hpp" namespace "cudf" nogil: - cdef unique_ptr[column] make_numeric_column(data_type type, - size_type size, - mask_state state) except + + cdef unique_ptr[column] make_numeric_column( + data_type type, + size_type size, + mask_state state + ) except +libcudf_exception_handler - cdef unique_ptr[column] make_numeric_column(data_type type, - size_type size, - device_buffer mask, - size_type null_count) except + + cdef unique_ptr[column] make_numeric_column( + data_type type, + size_type size, + device_buffer mask, + size_type null_count + ) except +libcudf_exception_handler cdef unique_ptr[column] make_fixed_point_column( data_type type, size_type size, - mask_state state) except + + mask_state state) except +libcudf_exception_handler cdef unique_ptr[column] make_fixed_point_column( data_type type, size_type size, device_buffer mask, - size_type null_count) except + + size_type null_count) except +libcudf_exception_handler cdef unique_ptr[column] make_timestamp_column( data_type type, size_type size, - mask_state state) except + + mask_state state) except +libcudf_exception_handler cdef unique_ptr[column] make_timestamp_column( data_type type, size_type size, device_buffer mask, - size_type null_count) except + + size_type null_count) except +libcudf_exception_handler cdef unique_ptr[column] make_duration_column( data_type type, size_type size, - mask_state state) except + + mask_state state) except +libcudf_exception_handler cdef unique_ptr[column] make_duration_column( data_type type, size_type size, device_buffer mask, - size_type null_count) except + + size_type null_count) except +libcudf_exception_handler cdef unique_ptr[column] make_fixed_width_column( data_type type, size_type size, - mask_state state) except + + mask_state state) except +libcudf_exception_handler cdef unique_ptr[column] make_fixed_width_column( data_type type, size_type size, device_buffer mask, - size_type null_count) except + + size_type null_count) except +libcudf_exception_handler - cdef unique_ptr[column] make_column_from_scalar(const scalar& s, - size_type size) except + + cdef unique_ptr[column] make_column_from_scalar( + const scalar& s, + size_type size + ) except +libcudf_exception_handler - cdef unique_ptr[column] make_dictionary_from_scalar(const scalar& s, - size_type size) except + + cdef unique_ptr[column] make_dictionary_from_scalar( + const scalar& s, + size_type size + ) except +libcudf_exception_handler - cdef unique_ptr[column] make_empty_column(type_id id) except + - cdef unique_ptr[column] make_empty_column(data_type type_) except + + cdef unique_ptr[column] make_empty_column( + type_id id + ) except +libcudf_exception_handler + cdef unique_ptr[column] make_empty_column( + data_type type_ + ) except +libcudf_exception_handler cdef unique_ptr[column] make_dictionary_column( unique_ptr[column] keys_column, - unique_ptr[column] indices_column) except + + unique_ptr[column] indices_column) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd b/python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd index c0e971eb5bd..105bea7b8ef 100644 --- a/python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd @@ -1,29 +1,29 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport bitmask_type, data_type, size_type cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: cdef cppclass column_view: - column_view() except + - column_view(const column_view& other) except + + column_view() except +libcudf_exception_handler + column_view(const column_view& other) except +libcudf_exception_handler - column_view& operator=(const column_view&) except + + column_view& operator=(const column_view&) except +libcudf_exception_handler column_view( data_type type, size_type size, const void* data - ) except + + ) except +libcudf_exception_handler column_view( data_type type, size_type size, const void* data, const bitmask_type* null_mask - ) except + + ) except +libcudf_exception_handler column_view( data_type type, @@ -31,7 +31,7 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: const void* data, const bitmask_type* null_mask, size_type null_count - ) except + + ) except +libcudf_exception_handler column_view( data_type type, @@ -40,7 +40,7 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: const bitmask_type* null_mask, size_type null_count, size_type offset - ) except + + ) except +libcudf_exception_handler column_view( data_type type, @@ -50,37 +50,41 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: size_type null_count, size_type offset, vector[column_view] children - ) except + - - const T* data[T]() except + - const T* head[T]() except + - const bitmask_type* null_mask() except + - size_type size() except + - data_type type() except + - bool nullable() except + - size_type null_count() except + - bool has_nulls() except + - size_type offset() except + - size_type num_children() except + - column_view child(size_type) except + + ) except +libcudf_exception_handler + + const T* data[T]() except +libcudf_exception_handler + const T* head[T]() except +libcudf_exception_handler + const bitmask_type* null_mask() except +libcudf_exception_handler + size_type size() except +libcudf_exception_handler + data_type type() except +libcudf_exception_handler + bool nullable() except +libcudf_exception_handler + size_type null_count() except +libcudf_exception_handler + bool has_nulls() except +libcudf_exception_handler + size_type offset() except +libcudf_exception_handler + size_type num_children() except +libcudf_exception_handler + column_view child(size_type) except +libcudf_exception_handler cdef cppclass mutable_column_view: - mutable_column_view() except + - mutable_column_view(const mutable_column_view&) except + - mutable_column_view& operator=(const mutable_column_view&) except + + mutable_column_view() except +libcudf_exception_handler + mutable_column_view( + const mutable_column_view& + ) except +libcudf_exception_handler + mutable_column_view& operator=( + const mutable_column_view& + ) except +libcudf_exception_handler mutable_column_view( data_type type, size_type size, const void* data - ) except + + ) except +libcudf_exception_handler mutable_column_view( data_type type, size_type size, const void* data, const bitmask_type* null_mask - ) except + + ) except +libcudf_exception_handler mutable_column_view( data_type type, @@ -88,7 +92,7 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: const void* data, const bitmask_type* null_mask, size_type null_count - ) except + + ) except +libcudf_exception_handler mutable_column_view( data_type type, @@ -97,22 +101,22 @@ cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: const bitmask_type* null_mask, size_type null_count, size_type offset - ) except + + ) except +libcudf_exception_handler mutable_column_view( data_type type, size_type size, const void* data, const bitmask_type* null_mask, size_type null_count, size_type offset, vector[mutable_column_view] children - ) except + - - T* data[T]() except + - T* head[T]() except + - bitmask_type* null_mask() except + - size_type size() except + - data_type type() except + - bool nullable() except + - size_type null_count() except + - bool has_nulls() except + - size_type offset() except + - size_type num_children() except + - mutable_column_view& child(size_type) except + + ) except +libcudf_exception_handler + + T* data[T]() except +libcudf_exception_handler + T* head[T]() except +libcudf_exception_handler + bitmask_type* null_mask() except +libcudf_exception_handler + size_type size() except +libcudf_exception_handler + data_type type() except +libcudf_exception_handler + bool nullable() except +libcudf_exception_handler + size_type null_count() except +libcudf_exception_handler + bool has_nulls() except +libcudf_exception_handler + size_type offset() except +libcudf_exception_handler + size_type num_children() except +libcudf_exception_handler + mutable_column_view& child(size_type) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/concatenate.pxd b/python/pylibcudf/pylibcudf/libcudf/concatenate.pxd index def292148c5..0a827b21cda 100644 --- a/python/pylibcudf/pylibcudf/libcudf/concatenate.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/concatenate.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column, column_view from pylibcudf.libcudf.table.table cimport table, table_view from pylibcudf.libcudf.utilities.span cimport host_span @@ -15,7 +15,13 @@ cdef extern from "cudf/concatenate.hpp" namespace "cudf" nogil: # constructable from a vector. In case they are needed in the future, # host_span versions can be added, e.g: # - # cdef unique_ptr[column] concatenate(host_span[column_view] columns) except + + # cdef unique_ptr[column] concatenate( + # host_span[column_view] columns + # ) except +libcudf_exception_handler - cdef unique_ptr[column] concatenate(const vector[column_view] columns) except + - cdef unique_ptr[table] concatenate(const vector[table_view] tables) except + + cdef unique_ptr[column] concatenate( + const vector[column_view] columns + ) except +libcudf_exception_handler + cdef unique_ptr[table] concatenate( + const vector[table_view] tables + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd b/python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd index 12090af16cc..9df828015eb 100644 --- a/python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint8_t from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.table.table_view cimport table_view from pylibcudf.libcudf.types cimport size_type @@ -21,13 +21,17 @@ cdef extern from "cudf/contiguous_split.hpp" namespace "cudf" nogil: cdef vector[contiguous_split_result] contiguous_split ( table_view input_table, vector[size_type] splits - ) except + + ) except +libcudf_exception_handler - cdef packed_columns pack (const table_view& input) except + + cdef packed_columns pack ( + const table_view& input + ) except +libcudf_exception_handler - cdef table_view unpack (const packed_columns& input) except + + cdef table_view unpack ( + const packed_columns& input + ) except +libcudf_exception_handler cdef table_view unpack ( const uint8_t* metadata, const uint8_t* gpu_data - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/copying.pxd b/python/pylibcudf/pylibcudf/libcudf/copying.pxd index e6e719d6436..5a05284e86a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/copying.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/copying.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t, int64_t, uint8_t from libcpp cimport bool from libcpp.functional cimport reference_wrapper diff --git a/python/pylibcudf/pylibcudf/libcudf/datetime.pxd b/python/pylibcudf/pylibcudf/libcudf/datetime.pxd index 8bbc120cff8..049a1b06c2e 100644 --- a/python/pylibcudf/pylibcudf/libcudf/datetime.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/datetime.pxd @@ -2,6 +2,7 @@ from libc.stdint cimport int32_t, uint8_t from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport scalar @@ -20,26 +21,40 @@ cdef extern from "cudf/datetime.hpp" namespace "cudf::datetime" nogil: MICROSECOND NANOSECOND - cdef unique_ptr[column] extract_year(const column_view& column) except + - cdef unique_ptr[column] extract_month(const column_view& column) except + - cdef unique_ptr[column] extract_day(const column_view& column) except + - cdef unique_ptr[column] extract_weekday(const column_view& column) except + - cdef unique_ptr[column] extract_hour(const column_view& column) except + - cdef unique_ptr[column] extract_minute(const column_view& column) except + - cdef unique_ptr[column] extract_second(const column_view& column) except + + cdef unique_ptr[column] extract_year( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_month( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_day( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_weekday( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_hour( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_minute( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_second( + const column_view& column + ) except +libcudf_exception_handler cdef unique_ptr[column] extract_millisecond_fraction( const column_view& column - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] extract_microsecond_fraction( const column_view& column - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] extract_nanosecond_fraction( const column_view& column - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] extract_datetime_component( const column_view& column, datetime_component component - ) except + + ) except +libcudf_exception_handler cpdef enum class rounding_frequency(int32_t): DAY @@ -52,26 +67,34 @@ cdef extern from "cudf/datetime.hpp" namespace "cudf::datetime" nogil: cdef unique_ptr[column] ceil_datetimes( const column_view& column, rounding_frequency freq - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] floor_datetimes( const column_view& column, rounding_frequency freq - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] round_datetimes( const column_view& column, rounding_frequency freq - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] add_calendrical_months( const column_view& timestamps, const column_view& months - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] add_calendrical_months( const column_view& timestamps, const scalar& months - ) except + - cdef unique_ptr[column] day_of_year(const column_view& column) except + - cdef unique_ptr[column] is_leap_year(const column_view& column) except + + ) except +libcudf_exception_handler + cdef unique_ptr[column] day_of_year( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] is_leap_year( + const column_view& column + ) except +libcudf_exception_handler cdef unique_ptr[column] last_day_of_month( const column_view& column - ) except + - cdef unique_ptr[column] extract_quarter(const column_view& column) except + - cdef unique_ptr[column] days_in_month(const column_view& column) except + + ) except +libcudf_exception_handler + cdef unique_ptr[column] extract_quarter( + const column_view& column + ) except +libcudf_exception_handler + cdef unique_ptr[column] days_in_month( + const column_view& column + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/experimental.pxd b/python/pylibcudf/pylibcudf/libcudf/experimental.pxd index f280a382a04..764815fba36 100644 --- a/python/pylibcudf/pylibcudf/libcudf/experimental.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/experimental.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/utilities/prefetch.hpp" \ diff --git a/python/pylibcudf/pylibcudf/libcudf/expressions.pxd b/python/pylibcudf/pylibcudf/libcudf/expressions.pxd index 5ba2dff6074..0e42d2bd02c 100644 --- a/python/pylibcudf/pylibcudf/libcudf/expressions.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/expressions.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.scalar.scalar cimport ( duration_scalar, @@ -75,15 +75,15 @@ cdef extern from "cudf/ast/expressions.hpp" namespace "cudf::ast" nogil: cdef cppclass literal(expression): # Due to https://github.com/cython/cython/issues/3198, we need to # specify a return type for templated constructors. - literal literal[T](numeric_scalar[T] &) except + - literal literal[T](timestamp_scalar[T] &) except + - literal literal[T](duration_scalar[T] &) except + + literal literal[T](numeric_scalar[T] &) except +libcudf_exception_handler + literal literal[T](timestamp_scalar[T] &) except +libcudf_exception_handler + literal literal[T](duration_scalar[T] &) except +libcudf_exception_handler cdef cppclass column_reference(expression): # Allow for default C++ parameters by declaring multiple constructors # with the default parameters optionally omitted. - column_reference(size_type) except + - column_reference(size_type, table_reference) except + + column_reference(size_type) except +libcudf_exception_handler + column_reference(size_type, table_reference) except +libcudf_exception_handler cdef cppclass operation(expression): operation(ast_operator, const expression &) @@ -92,4 +92,4 @@ cdef extern from "cudf/ast/expressions.hpp" namespace "cudf::ast" nogil: cdef cppclass column_name_reference(expression): # column_name_reference is only meant for use in file I/O such as the # Parquet reader. - column_name_reference(string) except + + column_name_reference(string) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/filling.pxd b/python/pylibcudf/pylibcudf/libcudf/filling.pxd index 7bed80050d2..f0bfe8ca80b 100644 --- a/python/pylibcudf/pylibcudf/libcudf/filling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/filling.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport ( column_view, @@ -19,33 +19,33 @@ cdef extern from "cudf/filling.hpp" namespace "cudf" nogil: size_type begin, size_type end, const scalar & value - ) except + + ) except +libcudf_exception_handler cdef void fill_in_place( const mutable_column_view & destination, size_type beign, size_type end, const scalar & value - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] repeat( const table_view & input, const column_view & count, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] repeat( const table_view & input, size_type count - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] sequence( size_type size, const scalar & init, const scalar & step - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] calendrical_month_sequence( size_type n, const scalar& init, size_type months, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/fixed_point/fixed_point.pxd b/python/pylibcudf/pylibcudf/libcudf/fixed_point/fixed_point.pxd index e55574020f4..a4461f34ab2 100644 --- a/python/pylibcudf/pylibcudf/libcudf/fixed_point/fixed_point.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/fixed_point/fixed_point.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/fixed_point/fixed_point.hpp" namespace "numeric" nogil: diff --git a/python/pylibcudf/pylibcudf/libcudf/groupby.pxd b/python/pylibcudf/pylibcudf/libcudf/groupby.pxd index 17ea33a2066..cbbc174d7bf 100644 --- a/python/pylibcudf/pylibcudf/libcudf/groupby.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/groupby.pxd @@ -1,10 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.functional cimport reference_wrapper from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.aggregation cimport ( groupby_aggregation, groupby_scan_aggregation, @@ -31,12 +31,12 @@ cdef extern from "cudf/groupby.hpp" \ namespace "cudf::groupby" nogil: cdef cppclass aggregation_request: - aggregation_request() except + + aggregation_request() except +libcudf_exception_handler column_view values vector[unique_ptr[groupby_aggregation]] aggregations cdef cppclass scan_request: - scan_request() except + + scan_request() except +libcudf_exception_handler column_view values vector[unique_ptr[groupby_scan_aggregation]] aggregations @@ -50,24 +50,24 @@ cdef extern from "cudf/groupby.hpp" \ unique_ptr[table] values cdef cppclass groupby: - groupby(const table_view& keys) except + + groupby(const table_view& keys) except +libcudf_exception_handler groupby( const table_view& keys, null_policy include_null_keys - ) except + + ) except +libcudf_exception_handler groupby( const table_view& keys, null_policy include_null_keys, sorted keys_are_sorted, - ) except + + ) except +libcudf_exception_handler groupby( const table_view& keys, null_policy include_null_keys, sorted keys_are_sorted, const vector[order]& column_order, - ) except + + ) except +libcudf_exception_handler groupby( const table_view& keys, @@ -75,21 +75,21 @@ cdef extern from "cudf/groupby.hpp" \ sorted keys_are_sorted, const vector[order]& column_order, const vector[null_order]& null_precedence - ) except + + ) except +libcudf_exception_handler pair[ unique_ptr[table], vector[aggregation_result] ] aggregate( const vector[aggregation_request]& requests, - ) except + + ) except +libcudf_exception_handler pair[ unique_ptr[table], vector[aggregation_result] ] scan( const vector[scan_request]& requests, - ) except + + ) except +libcudf_exception_handler pair[ unique_ptr[table], @@ -98,12 +98,12 @@ cdef extern from "cudf/groupby.hpp" \ const table_view values, const vector[size_type] offset, const vector[reference_wrapper[constscalar]] fill_values - ) except + + ) except +libcudf_exception_handler - groups get_groups() except + - groups get_groups(table_view values) except + + groups get_groups() except +libcudf_exception_handler + groups get_groups(table_view values) except +libcudf_exception_handler pair[unique_ptr[table], unique_ptr[table]] replace_nulls( const table_view& values, const vector[replace_policy] replace_policy - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/hash.pxd b/python/pylibcudf/pylibcudf/libcudf/hash.pxd index c4222bc9dc5..4e8a01b41a5 100644 --- a/python/pylibcudf/pylibcudf/libcudf/hash.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/hash.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint32_t, uint64_t from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector diff --git a/python/pylibcudf/pylibcudf/libcudf/interop.pxd b/python/pylibcudf/pylibcudf/libcudf/interop.pxd index b75e9ca7001..8953357a087 100644 --- a/python/pylibcudf/pylibcudf/libcudf/interop.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/interop.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport scalar @@ -12,19 +12,19 @@ from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "dlpack/dlpack.h" nogil: ctypedef struct DLManagedTensor: - void(*deleter)(DLManagedTensor*) except + + void(*deleter)(DLManagedTensor*) except +libcudf_exception_handler # The Arrow structs are not namespaced. cdef extern from "cudf/interop.hpp" nogil: cdef struct ArrowSchema: - void (*release)(ArrowSchema*) noexcept nogil + void (*release)(ArrowSchema*) noexcept cdef struct ArrowArray: - void (*release)(ArrowArray*) noexcept nogil + void (*release)(ArrowArray*) noexcept cdef struct ArrowArrayStream: - void (*release)(ArrowArrayStream*) noexcept nogil + void (*release)(ArrowArrayStream*) noexcept cdef struct ArrowDeviceArray: ArrowArray array @@ -34,23 +34,25 @@ cdef extern from "cudf/interop.hpp" namespace "cudf" \ nogil: cdef unique_ptr[table] from_dlpack( const DLManagedTensor* managed_tensor - ) except + + ) except +libcudf_exception_handler DLManagedTensor* to_dlpack( const table_view& input - ) except + + ) except +libcudf_exception_handler cdef cppclass column_metadata: - column_metadata() except + - column_metadata(string name_) except + + column_metadata() except +libcudf_exception_handler + column_metadata(string name_) except +libcudf_exception_handler string name vector[column_metadata] children_meta - cdef unique_ptr[table] from_arrow_stream(ArrowArrayStream* input) except + + cdef unique_ptr[table] from_arrow_stream( + ArrowArrayStream* input + ) except +libcudf_exception_handler cdef unique_ptr[column] from_arrow_column( const ArrowSchema* schema, const ArrowArray* input - ) except + + ) except +libcudf_exception_handler cdef extern from *: @@ -84,5 +86,7 @@ cdef extern from *: cdef ArrowSchema *to_arrow_schema_raw( const table_view& tbl, const vector[column_metadata]& metadata, - ) except + nogil - cdef ArrowArray* to_arrow_host_raw(const table_view& tbl) except + nogil + ) except +libcudf_exception_handler nogil + cdef ArrowArray* to_arrow_host_raw( + const table_view& tbl + ) except +libcudf_exception_handler nogil diff --git a/python/pylibcudf/pylibcudf/libcudf/io/avro.pxd b/python/pylibcudf/pylibcudf/libcudf/io/avro.pxd index 2d76e2f6c80..cac55640ac9 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/avro.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/avro.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.io.types as cudf_io_types from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport size_type @@ -10,34 +10,40 @@ cdef extern from "cudf/io/avro.hpp" \ namespace "cudf::io" nogil: cdef cppclass avro_reader_options: - avro_reader_options() except + - cudf_io_types.source_info get_source() except + - vector[string] get_columns() except + - size_type get_skip_rows() except + - size_type get_num_rows() except + + avro_reader_options() except +libcudf_exception_handler + cudf_io_types.source_info get_source() except +libcudf_exception_handler + vector[string] get_columns() except +libcudf_exception_handler + size_type get_skip_rows() except +libcudf_exception_handler + size_type get_num_rows() except +libcudf_exception_handler # setters - void set_columns(vector[string] col_names) except + - void set_skip_rows(size_type val) except + - void set_num_rows(size_type val) except + + void set_columns(vector[string] col_names) except +libcudf_exception_handler + void set_skip_rows(size_type val) except +libcudf_exception_handler + void set_num_rows(size_type val) except +libcudf_exception_handler @staticmethod avro_reader_options_builder builder( cudf_io_types.source_info src - ) except + + ) except +libcudf_exception_handler cdef cppclass avro_reader_options_builder: - avro_reader_options_builder() except + + avro_reader_options_builder() except +libcudf_exception_handler avro_reader_options_builder( cudf_io_types.source_info src - ) except + - avro_reader_options_builder& columns(vector[string] col_names) except + - avro_reader_options_builder& skip_rows(size_type val) except + - avro_reader_options_builder& num_rows(size_type val) except + - - avro_reader_options build() except + + ) except +libcudf_exception_handler + avro_reader_options_builder& columns( + vector[string] col_names + ) except +libcudf_exception_handler + avro_reader_options_builder& skip_rows( + size_type val + ) except +libcudf_exception_handler + avro_reader_options_builder& num_rows( + size_type val + ) except +libcudf_exception_handler + + avro_reader_options build() except +libcudf_exception_handler cdef cudf_io_types.table_with_metadata read_avro( avro_reader_options &options - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/csv.pxd b/python/pylibcudf/pylibcudf/libcudf/io/csv.pxd index 73a6d98650c..7ca158016a2 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/csv.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/csv.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.io.types as cudf_io_types cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport uint8_t @@ -8,6 +7,7 @@ from libcpp.map cimport map from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport data_type, size_type @@ -15,227 +15,319 @@ cdef extern from "cudf/io/csv.hpp" \ namespace "cudf::io" nogil: cdef cppclass csv_reader_options: - csv_reader_options() except + + csv_reader_options() except +libcudf_exception_handler # Getter - cudf_io_types.source_info get_source() except + + cudf_io_types.source_info get_source() except +libcudf_exception_handler # Reader settings - cudf_io_types.compression_type get_compression() except + - size_t get_byte_range_offset() except + - size_t get_byte_range_size() except + - vector[string] get_names() except + - string get_prefix() except + - bool is_enabled_mangle_dupe_cols() except + + cudf_io_types.compression_type get_compression()\ + except +libcudf_exception_handler + size_t get_byte_range_offset() except +libcudf_exception_handler + size_t get_byte_range_size() except +libcudf_exception_handler + vector[string] get_names() except +libcudf_exception_handler + string get_prefix() except +libcudf_exception_handler + bool is_enabled_mangle_dupe_cols() except +libcudf_exception_handler # Filter settings - vector[string] get_use_cols_names() except + - vector[int] get_use_cols_indexes() except + - size_type get_nrows() except + - size_type get_skiprows() except + - size_type get_skipfooter() except + - size_type get_header() except + + vector[string] get_use_cols_names() except +libcudf_exception_handler + vector[int] get_use_cols_indexes() except +libcudf_exception_handler + size_type get_nrows() except +libcudf_exception_handler + size_type get_skiprows() except +libcudf_exception_handler + size_type get_skipfooter() except +libcudf_exception_handler + size_type get_header() except +libcudf_exception_handler # Parsing settings - char get_lineterminator() except + - char get_delimiter() except + - char get_thousands() except + - char get_decimal() except + - char get_comment() except + - bool is_enabled_windowslinetermination() except + - bool is_enabled_delim_whitespace() except + - bool is_enabled_skipinitialspace() except + - bool is_enabled_skip_blank_lines() except + - cudf_io_types.quote_style get_quoting() except + - char get_quotechar() except + - bool is_enabled_doublequote() except + - bool is_enabled_updated_quotes_detection() except + - vector[string] get_parse_dates_names() except + - vector[int] get_parse_dates_indexes() except + - vector[string] get_parse_hex_names() except + - vector[int] get_parse_hex_indexes() except + + char get_lineterminator() except +libcudf_exception_handler + char get_delimiter() except +libcudf_exception_handler + char get_thousands() except +libcudf_exception_handler + char get_decimal() except +libcudf_exception_handler + char get_comment() except +libcudf_exception_handler + bool is_enabled_windowslinetermination() except +libcudf_exception_handler + bool is_enabled_delim_whitespace() except +libcudf_exception_handler + bool is_enabled_skipinitialspace() except +libcudf_exception_handler + bool is_enabled_skip_blank_lines() except +libcudf_exception_handler + cudf_io_types.quote_style get_quoting() except +libcudf_exception_handler + char get_quotechar() except +libcudf_exception_handler + bool is_enabled_doublequote() except +libcudf_exception_handler + bool is_enabled_updated_quotes_detection() except +libcudf_exception_handler + vector[string] get_parse_dates_names() except +libcudf_exception_handler + vector[int] get_parse_dates_indexes() except +libcudf_exception_handler + vector[string] get_parse_hex_names() except +libcudf_exception_handler + vector[int] get_parse_hex_indexes() except +libcudf_exception_handler # Conversion settings - vector[string] get_dtype() except + - vector[string] get_true_values() except + - vector[string] get_false_values() except + - vector[string] get_na_values() except + - bool is_enabled_keep_default_na() except + - bool is_enabled_na_filter() except + - bool is_enabled_dayfirst() except + + vector[string] get_dtype() except +libcudf_exception_handler + vector[string] get_true_values() except +libcudf_exception_handler + vector[string] get_false_values() except +libcudf_exception_handler + vector[string] get_na_values() except +libcudf_exception_handler + bool is_enabled_keep_default_na() except +libcudf_exception_handler + bool is_enabled_na_filter() except +libcudf_exception_handler + bool is_enabled_dayfirst() except +libcudf_exception_handler # setter # Reader settings - void set_compression(cudf_io_types.compression_type comp) except + - void set_byte_range_offset(size_t val) except + - void set_byte_range_size(size_t val) except + - void set_names(vector[string] val) except + - void set_prefix(string pfx) except + - void set_mangle_dupe_cols(bool val) except + + void set_compression( + cudf_io_types.compression_type comp + ) except +libcudf_exception_handler + void set_byte_range_offset(size_t val) except +libcudf_exception_handler + void set_byte_range_size(size_t val) except +libcudf_exception_handler + void set_names(vector[string] val) except +libcudf_exception_handler + void set_prefix(string pfx) except +libcudf_exception_handler + void set_mangle_dupe_cols(bool val) except +libcudf_exception_handler # Filter settings - void set_use_cols_names(vector[string] col_names) except + - void set_use_cols_indexes(vector[int] col_ind) except + - void set_nrows(size_type n_rows) except + - void set_skiprows(size_type val) except + - void set_skipfooter(size_type val) except + - void set_header(size_type hdr) except + + void set_use_cols_names( + vector[string] col_names + ) except +libcudf_exception_handler + void set_use_cols_indexes( + vector[int] col_ind + ) except +libcudf_exception_handler + void set_nrows(size_type n_rows) except +libcudf_exception_handler + void set_skiprows(size_type val) except +libcudf_exception_handler + void set_skipfooter(size_type val) except +libcudf_exception_handler + void set_header(size_type hdr) except +libcudf_exception_handler # Parsing settings - void set_lineterminator(char val) except + - void set_delimiter(char val) except + - void set_thousands(char val) except + - void set_decimal(char val) except + - void set_comment(char val) except + - void enable_windowslinetermination(bool val) except + - void enable_delim_whitespace(bool val) except + - void enable_skipinitialspace(bool val) except + - void enable_skip_blank_lines(bool val) except + - void set_quoting(cudf_io_types.quote_style style) except + - void set_quotechar(char val) except + - void set_doublequote(bool val) except + - void set_detect_whitespace_around_quotes(bool val) except + - void set_parse_dates(vector[string]) except + - void set_parse_dates(vector[int]) except + - void set_parse_hex(vector[string]) except + - void set_parse_hex(vector[int]) except + + void set_lineterminator(char val) except +libcudf_exception_handler + void set_delimiter(char val) except +libcudf_exception_handler + void set_thousands(char val) except +libcudf_exception_handler + void set_decimal(char val) except +libcudf_exception_handler + void set_comment(char val) except +libcudf_exception_handler + void enable_windowslinetermination(bool val) except +libcudf_exception_handler + void enable_delim_whitespace(bool val) except +libcudf_exception_handler + void enable_skipinitialspace(bool val) except +libcudf_exception_handler + void enable_skip_blank_lines(bool val) except +libcudf_exception_handler + void set_quoting( + cudf_io_types.quote_style style + ) except +libcudf_exception_handler + void set_quotechar(char val) except +libcudf_exception_handler + void set_doublequote(bool val) except +libcudf_exception_handler + void set_detect_whitespace_around_quotes( + bool val + ) except +libcudf_exception_handler + void set_parse_dates(vector[string]) except +libcudf_exception_handler + void set_parse_dates(vector[int]) except +libcudf_exception_handler + void set_parse_hex(vector[string]) except +libcudf_exception_handler + void set_parse_hex(vector[int]) except +libcudf_exception_handler # Conversion settings - void set_dtypes(vector[data_type] types) except + - void set_dtypes(map[string, data_type] types) except + - void set_true_values(vector[string] vals) except + - void set_false_values(vector[string] vals) except + - void set_na_values(vector[string] vals) except + - void enable_keep_default_na(bool val) except + - void enable_na_filter(bool val) except + - void enable_dayfirst(bool val) except + - void set_timestamp_type(data_type type) except + + void set_dtypes(vector[data_type] types) except +libcudf_exception_handler + void set_dtypes(map[string, data_type] types) except +libcudf_exception_handler + void set_true_values(vector[string] vals) except +libcudf_exception_handler + void set_false_values(vector[string] vals) except +libcudf_exception_handler + void set_na_values(vector[string] vals) except +libcudf_exception_handler + void enable_keep_default_na(bool val) except +libcudf_exception_handler + void enable_na_filter(bool val) except +libcudf_exception_handler + void enable_dayfirst(bool val) except +libcudf_exception_handler + void set_timestamp_type(data_type type) except +libcudf_exception_handler @staticmethod csv_reader_options_builder builder( cudf_io_types.source_info src - ) except + + ) except +libcudf_exception_handler cdef cppclass csv_reader_options_builder: - csv_reader_options_builder() except + + csv_reader_options_builder() except +libcudf_exception_handler csv_reader_options_builder( cudf_io_types.source_info src - ) except + + ) except +libcudf_exception_handler csv_reader_options_builder& source( cudf_io_types.source_info info - ) except + + ) except +libcudf_exception_handler # Reader settings csv_reader_options_builder& compression( cudf_io_types.compression_type comp - ) except + - csv_reader_options_builder& byte_range_offset(size_t val) except + - csv_reader_options_builder& byte_range_size(size_t val) except + - csv_reader_options_builder& names(vector[string] val) except + - csv_reader_options_builder& prefix(string pfx) except + - csv_reader_options_builder& mangle_dupe_cols(bool val) except + + ) except +libcudf_exception_handler + csv_reader_options_builder& byte_range_offset( + size_t val + ) except +libcudf_exception_handler + csv_reader_options_builder& byte_range_size( + size_t val + ) except +libcudf_exception_handler + csv_reader_options_builder& names( + vector[string] val + ) except +libcudf_exception_handler + csv_reader_options_builder& prefix( + string pfx + ) except +libcudf_exception_handler + csv_reader_options_builder& mangle_dupe_cols( + bool val + ) except +libcudf_exception_handler # Filter settings csv_reader_options_builder& use_cols_names( vector[string] col_names - ) except + + ) except +libcudf_exception_handler csv_reader_options_builder& use_cols_indexes( vector[int] col_ind - ) except + - csv_reader_options_builder& nrows(size_type n_rows) except + - csv_reader_options_builder& skiprows(size_type val) except + - csv_reader_options_builder& skipfooter(size_type val) except + - csv_reader_options_builder& header(size_type hdr) except + + ) except +libcudf_exception_handler + csv_reader_options_builder& nrows( + size_type n_rows + ) except +libcudf_exception_handler + csv_reader_options_builder& skiprows( + size_type val + ) except +libcudf_exception_handler + csv_reader_options_builder& skipfooter( + size_type val + ) except +libcudf_exception_handler + csv_reader_options_builder& header( + size_type hdr + ) except +libcudf_exception_handler # Parsing settings - csv_reader_options_builder& lineterminator(char val) except + - csv_reader_options_builder& delimiter(char val) except + - csv_reader_options_builder& thousands(char val) except + - csv_reader_options_builder& decimal(char val) except + - csv_reader_options_builder& comment(char val) except + - csv_reader_options_builder& windowslinetermination(bool val) except + - csv_reader_options_builder& delim_whitespace(bool val) except + - csv_reader_options_builder& skipinitialspace(bool val) except + - csv_reader_options_builder& skip_blank_lines(bool val) except + + csv_reader_options_builder& lineterminator( + char val + ) except +libcudf_exception_handler + csv_reader_options_builder& delimiter( + char val + ) except +libcudf_exception_handler + csv_reader_options_builder& thousands( + char val + ) except +libcudf_exception_handler + csv_reader_options_builder& decimal( + char val + ) except +libcudf_exception_handler + csv_reader_options_builder& comment( + char val + ) except +libcudf_exception_handler + csv_reader_options_builder& windowslinetermination( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& delim_whitespace( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& skipinitialspace( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& skip_blank_lines( + bool val + ) except +libcudf_exception_handler csv_reader_options_builder& quoting( cudf_io_types.quote_style style - ) except + - csv_reader_options_builder& quotechar(char val) except + - csv_reader_options_builder& doublequote(bool val) except + - csv_reader_options_builder& detect_whitespace_around_quotes(bool val) except + - csv_reader_options_builder& parse_dates(vector[string]) except + - csv_reader_options_builder& parse_dates(vector[int]) except + + ) except +libcudf_exception_handler + csv_reader_options_builder& quotechar( + char val + ) except +libcudf_exception_handler + csv_reader_options_builder& doublequote( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& detect_whitespace_around_quotes( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& parse_dates( + vector[string] + ) except +libcudf_exception_handler + csv_reader_options_builder& parse_dates( + vector[int] + ) except +libcudf_exception_handler # Conversion settings - csv_reader_options_builder& dtypes(vector[string] types) except + - csv_reader_options_builder& dtypes(vector[data_type] types) except + + csv_reader_options_builder& dtypes( + vector[string] types) except +libcudf_exception_handler + csv_reader_options_builder& dtypes( + vector[data_type] types + ) except +libcudf_exception_handler csv_reader_options_builder& dtypes( map[string, data_type] types - ) except + - csv_reader_options_builder& true_values(vector[string] vals) except + - csv_reader_options_builder& false_values(vector[string] vals) except + - csv_reader_options_builder& na_values(vector[string] vals) except + - csv_reader_options_builder& keep_default_na(bool val) except + - csv_reader_options_builder& na_filter(bool val) except + - csv_reader_options_builder& dayfirst(bool val) except + - csv_reader_options_builder& timestamp_type(data_type type) except + + ) except +libcudf_exception_handler + csv_reader_options_builder& true_values( + vector[string] vals + ) except +libcudf_exception_handler + csv_reader_options_builder& false_values( + vector[string] vals + ) except +libcudf_exception_handler + csv_reader_options_builder& na_values( + vector[string] vals + ) except +libcudf_exception_handler + csv_reader_options_builder& keep_default_na( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& na_filter( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& dayfirst( + bool val + ) except +libcudf_exception_handler + csv_reader_options_builder& timestamp_type( + data_type type + ) except +libcudf_exception_handler - csv_reader_options build() except + + csv_reader_options build() except +libcudf_exception_handler cdef cudf_io_types.table_with_metadata read_csv( csv_reader_options &options - ) except + + ) except +libcudf_exception_handler cdef cppclass csv_writer_options: - csv_writer_options() except + - - cudf_io_types.sink_info get_sink() except + - cudf_table_view.table_view get_table() except + - cudf_io_types.table_metadata get_metadata() except + - string get_na_rep() except + - bool is_enabled_include_header() except + - size_type get_rows_per_chunk() except + - string get_line_terminator() except + - char get_inter_column_delimiter() except + - string get_true_value() except + - string get_false_value() except + - vector[string] get_names() except + + csv_writer_options() except +libcudf_exception_handler + + cudf_io_types.sink_info get_sink() except +libcudf_exception_handler + cudf_table_view.table_view get_table() except +libcudf_exception_handler + cudf_io_types.table_metadata get_metadata() except +libcudf_exception_handler + string get_na_rep() except +libcudf_exception_handler + bool is_enabled_include_header() except +libcudf_exception_handler + size_type get_rows_per_chunk() except +libcudf_exception_handler + string get_line_terminator() except +libcudf_exception_handler + char get_inter_column_delimiter() except +libcudf_exception_handler + string get_true_value() except +libcudf_exception_handler + string get_false_value() except +libcudf_exception_handler + vector[string] get_names() except +libcudf_exception_handler # setter - void set_metadata(cudf_io_types.table_metadata* val) except + - void set_na_rep(string val) except + - void enable_include_header(bool val) except + - void set_rows_per_chunk(size_type val) except + - void set_line_terminator(string term) except + - void set_inter_column_delimiter(char delim) except + - void set_true_value(string val) except + - void set_false_value(string val) except + - void set_names(vector[string] val) except + + void set_metadata( + cudf_io_types.table_metadata* val + ) except +libcudf_exception_handler + void set_na_rep(string val) except +libcudf_exception_handler + void enable_include_header(bool val) except +libcudf_exception_handler + void set_rows_per_chunk(size_type val) except +libcudf_exception_handler + void set_line_terminator(string term) except +libcudf_exception_handler + void set_inter_column_delimiter(char delim) except +libcudf_exception_handler + void set_true_value(string val) except +libcudf_exception_handler + void set_false_value(string val) except +libcudf_exception_handler + void set_names(vector[string] val) except +libcudf_exception_handler @staticmethod csv_writer_options_builder builder( cudf_io_types.sink_info sink, cudf_table_view.table_view table - ) except + + ) except +libcudf_exception_handler cdef cppclass csv_writer_options_builder: - csv_writer_options_builder() except + + csv_writer_options_builder() except +libcudf_exception_handler csv_writer_options_builder( cudf_io_types.sink_info sink, cudf_table_view.table_view table - ) except + + ) except +libcudf_exception_handler - csv_writer_options_builder& names(vector[string] val) except + - csv_writer_options_builder& na_rep(string val) except + - csv_writer_options_builder& include_header(bool val) except + - csv_writer_options_builder& rows_per_chunk(size_type val) except + - csv_writer_options_builder& line_terminator(string term) except + - csv_writer_options_builder& inter_column_delimiter(char delim) except + - csv_writer_options_builder& true_value(string val) except + - csv_writer_options_builder& false_value(string val) except + + csv_writer_options_builder& names( + vector[string] val + ) except +libcudf_exception_handler + csv_writer_options_builder& na_rep( + string val + ) except +libcudf_exception_handler + csv_writer_options_builder& include_header( + bool val + ) except +libcudf_exception_handler + csv_writer_options_builder& rows_per_chunk( + size_type val + ) except +libcudf_exception_handler + csv_writer_options_builder& line_terminator( + string term + ) except +libcudf_exception_handler + csv_writer_options_builder& inter_column_delimiter( + char delim + ) except +libcudf_exception_handler + csv_writer_options_builder& true_value( + string val + ) except +libcudf_exception_handler + csv_writer_options_builder& false_value( + string val + ) except +libcudf_exception_handler - csv_writer_options build() except + + csv_writer_options build() except +libcudf_exception_handler - cdef void write_csv(csv_writer_options args) except + + cdef void write_csv(csv_writer_options args) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/data_sink.pxd b/python/pylibcudf/pylibcudf/libcudf/io/data_sink.pxd index e939a47d7f9..00f35bbf4e4 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/data_sink.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/data_sink.pxd @@ -1,4 +1,5 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/io/data_sink.hpp" \ diff --git a/python/pylibcudf/pylibcudf/libcudf/io/datasource.pxd b/python/pylibcudf/pylibcudf/libcudf/io/datasource.pxd index c69aa65bd3c..cda7d940c91 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/datasource.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/datasource.pxd @@ -1,4 +1,5 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/io/datasource.hpp" \ diff --git a/python/pylibcudf/pylibcudf/libcudf/io/json.pxd b/python/pylibcudf/pylibcudf/libcudf/io/json.pxd index 1c74f8ca3ac..a7ca6978621 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/json.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/json.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.io.types as cudf_io_types cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport int32_t, uint8_t @@ -8,6 +7,7 @@ from libcpp.map cimport map from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport data_type, size_type @@ -23,133 +23,154 @@ cdef extern from "cudf/io/json.hpp" \ RECOVER_WITH_NULL cdef cppclass json_reader_options: - json_reader_options() except + - cudf_io_types.source_info get_source() except + - vector[string] get_dtypes() except + - cudf_io_types.compression_type get_compression() except + - size_t get_byte_range_offset() except + - size_t get_byte_range_size() except + - bool is_enabled_lines() except + - bool is_enabled_mixed_types_as_string() except + - bool is_enabled_prune_columns() except + - bool is_enabled_dayfirst() except + - bool is_enabled_experimental() except + + json_reader_options() except +libcudf_exception_handler + cudf_io_types.source_info get_source() except +libcudf_exception_handler + vector[string] get_dtypes() except +libcudf_exception_handler + cudf_io_types.compression_type get_compression()\ + except +libcudf_exception_handler + size_t get_byte_range_offset() except +libcudf_exception_handler + size_t get_byte_range_size() except +libcudf_exception_handler + bool is_enabled_lines() except +libcudf_exception_handler + bool is_enabled_mixed_types_as_string() except +libcudf_exception_handler + bool is_enabled_prune_columns() except +libcudf_exception_handler + bool is_enabled_dayfirst() except +libcudf_exception_handler + bool is_enabled_experimental() except +libcudf_exception_handler # setter - void set_dtypes(vector[data_type] types) except + - void set_dtypes(map[string, schema_element] types) except + + void set_dtypes( + vector[data_type] types + ) except +libcudf_exception_handler + void set_dtypes( + map[string, schema_element] types + ) except +libcudf_exception_handler void set_compression( cudf_io_types.compression_type compression - ) except + - void set_byte_range_offset(size_t offset) except + - void set_byte_range_size(size_t size) except + - void enable_lines(bool val) except + - void enable_mixed_types_as_string(bool val) except + - void enable_prune_columns(bool val) except + - void enable_dayfirst(bool val) except + - void enable_experimental(bool val) except + - void enable_keep_quotes(bool val) except + + ) except +libcudf_exception_handler + void set_byte_range_offset(size_t offset) except +libcudf_exception_handler + void set_byte_range_size(size_t size) except +libcudf_exception_handler + void enable_lines(bool val) except +libcudf_exception_handler + void enable_mixed_types_as_string(bool val) except +libcudf_exception_handler + void enable_prune_columns(bool val) except +libcudf_exception_handler + void enable_dayfirst(bool val) except +libcudf_exception_handler + void enable_experimental(bool val) except +libcudf_exception_handler + void enable_keep_quotes(bool val) except +libcudf_exception_handler @staticmethod json_reader_options_builder builder( cudf_io_types.source_info src - ) except + + ) except +libcudf_exception_handler cdef cppclass json_reader_options_builder: - json_reader_options_builder() except + + json_reader_options_builder() except +libcudf_exception_handler json_reader_options_builder( cudf_io_types.source_info src - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& dtypes( vector[string] types - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& dtypes( vector[data_type] types - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& dtypes( map[string, schema_element] types - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& compression( cudf_io_types.compression_type compression - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& byte_range_offset( size_t offset - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& byte_range_size( size_t size - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& lines( bool val - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& mixed_types_as_string( bool val - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& prune_columns( bool val - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& dayfirst( bool val - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& keep_quotes( bool val - ) except + + ) except +libcudf_exception_handler json_reader_options_builder& recovery_mode( json_recovery_mode_t val - ) except + + ) except +libcudf_exception_handler - json_reader_options build() except + + json_reader_options build() except +libcudf_exception_handler cdef cudf_io_types.table_with_metadata read_json( - json_reader_options &options) except + + json_reader_options &options) except +libcudf_exception_handler cdef cppclass json_writer_options: - json_writer_options() except + - cudf_io_types.sink_info get_sink() except + - cudf_table_view.table_view get_table() except + - string get_na_rep() except + - bool is_enabled_include_nulls() except + - bool is_enabled_lines() except + - bool is_enabled_experimental() except + - size_type get_rows_per_chunk() except + - string get_true_value() except + - string get_false_value() except + + json_writer_options() except +libcudf_exception_handler + cudf_io_types.sink_info get_sink() except +libcudf_exception_handler + cudf_table_view.table_view get_table() except +libcudf_exception_handler + string get_na_rep() except +libcudf_exception_handler + bool is_enabled_include_nulls() except +libcudf_exception_handler + bool is_enabled_lines() except +libcudf_exception_handler + bool is_enabled_experimental() except +libcudf_exception_handler + size_type get_rows_per_chunk() except +libcudf_exception_handler + string get_true_value() except +libcudf_exception_handler + string get_false_value() except +libcudf_exception_handler # setter - void set_table(cudf_table_view.table_view tbl) except + - void set_metadata(cudf_io_types.table_metadata meta) except + - void set_na_rep(string val) except + - void enable_include_nulls(bool val) except + - void enable_lines(bool val) except + - void set_rows_per_chunk(size_type val) except + - void set_true_value(string val) except + - void set_false_value(string val) except + + void set_table( + cudf_table_view.table_view tbl + ) except +libcudf_exception_handler + void set_metadata( + cudf_io_types.table_metadata meta + ) except +libcudf_exception_handler + void set_na_rep(string val) except +libcudf_exception_handler + void enable_include_nulls(bool val) except +libcudf_exception_handler + void enable_lines(bool val) except +libcudf_exception_handler + void set_rows_per_chunk(size_type val) except +libcudf_exception_handler + void set_true_value(string val) except +libcudf_exception_handler + void set_false_value(string val) except +libcudf_exception_handler @staticmethod json_writer_options_builder builder( cudf_io_types.sink_info sink, cudf_table_view.table_view tbl - ) except + + ) except +libcudf_exception_handler cdef cppclass json_writer_options_builder: - json_writer_options_builder() except + + json_writer_options_builder() except +libcudf_exception_handler json_writer_options_builder( cudf_io_types.source_info src, cudf_table_view.table_view tbl - ) except + + ) except +libcudf_exception_handler json_writer_options_builder& table( cudf_table_view.table_view tbl - ) except + + ) except +libcudf_exception_handler json_writer_options_builder& metadata( cudf_io_types.table_metadata meta - ) except + - json_writer_options_builder& na_rep(string val) except + - json_writer_options_builder& include_nulls(bool val) except + - json_writer_options_builder& lines(bool val) except + - json_writer_options_builder& rows_per_chunk(size_type val) except + - json_writer_options_builder& true_value(string val) except + - json_writer_options_builder& false_value(string val) except + - - json_writer_options build() except + + ) except +libcudf_exception_handler + json_writer_options_builder& na_rep( + string val + ) except +libcudf_exception_handler + json_writer_options_builder& include_nulls( + bool val + ) except +libcudf_exception_handler + json_writer_options_builder& lines( + bool val + ) except +libcudf_exception_handler + json_writer_options_builder& rows_per_chunk( + size_type val + ) except +libcudf_exception_handler + json_writer_options_builder& true_value( + string val + ) except +libcudf_exception_handler + json_writer_options_builder& false_value( + string val + ) except +libcudf_exception_handler + + json_writer_options build() except +libcudf_exception_handler cdef cudf_io_types.table_with_metadata write_json( - json_writer_options &options) except + + json_writer_options &options) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/orc.pxd b/python/pylibcudf/pylibcudf/libcudf/io/orc.pxd index dca24c7f665..f5485da1d51 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/orc.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/orc.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.io.types as cudf_io_types cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport int64_t, uint8_t @@ -9,6 +8,7 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport data_type, size_type @@ -16,160 +16,206 @@ cdef extern from "cudf/io/orc.hpp" \ namespace "cudf::io" nogil: cdef cppclass orc_reader_options: - orc_reader_options() except + - - cudf_io_types.source_info get_source() except + - vector[vector[size_type]] get_stripes() except + - int64_t get_skip_rows() except + - optional[int64_t] get_num_rows() except + - bool is_enabled_use_index() except + - bool is_enabled_use_np_dtypes() except + - data_type get_timestamp_type() except + - bool is_enabled_decimals_as_float64() except + - int get_forced_decimals_scale() except + - - void set_columns(vector[string] col_names) except + - void set_stripes(vector[vector[size_type]] strps) except + - void set_skip_rows(int64_t rows) except + - void set_num_rows(int64_t nrows) except + - void enable_use_index(bool val) except + - void enable_use_np_dtypes(bool val) except + - void set_timestamp_type(data_type type) except + - void set_decimal128_columns(vector[string] val) except + + orc_reader_options() except +libcudf_exception_handler + + cudf_io_types.source_info get_source() except +libcudf_exception_handler + vector[vector[size_type]] get_stripes() except +libcudf_exception_handler + int64_t get_skip_rows() except +libcudf_exception_handler + optional[int64_t] get_num_rows() except +libcudf_exception_handler + bool is_enabled_use_index() except +libcudf_exception_handler + bool is_enabled_use_np_dtypes() except +libcudf_exception_handler + data_type get_timestamp_type() except +libcudf_exception_handler + bool is_enabled_decimals_as_float64() except +libcudf_exception_handler + int get_forced_decimals_scale() except +libcudf_exception_handler + + void set_columns(vector[string] col_names) except +libcudf_exception_handler + void set_stripes( + vector[vector[size_type]] strps + ) except +libcudf_exception_handler + void set_skip_rows(int64_t rows) except +libcudf_exception_handler + void set_num_rows(int64_t nrows) except +libcudf_exception_handler + void enable_use_index(bool val) except +libcudf_exception_handler + void enable_use_np_dtypes(bool val) except +libcudf_exception_handler + void set_timestamp_type(data_type type) except +libcudf_exception_handler + void set_decimal128_columns( + vector[string] val + ) except +libcudf_exception_handler @staticmethod orc_reader_options_builder builder( cudf_io_types.source_info src - ) except + + ) except +libcudf_exception_handler cdef cppclass orc_reader_options_builder: - orc_reader_options_builder() except + - orc_reader_options_builder(cudf_io_types.source_info &src) except + - - orc_reader_options_builder& columns(vector[string] col_names) except + + orc_reader_options_builder() except +libcudf_exception_handler + orc_reader_options_builder( + cudf_io_types.source_info &src + ) except +libcudf_exception_handler + + orc_reader_options_builder& columns( + vector[string] col_names + ) except +libcudf_exception_handler orc_reader_options_builder& \ - stripes(vector[vector[size_type]] strps) except + - orc_reader_options_builder& skip_rows(int64_t rows) except + - orc_reader_options_builder& num_rows(int64_t nrows) except + - orc_reader_options_builder& use_index(bool val) except + - orc_reader_options_builder& use_np_dtypes(bool val) except + - orc_reader_options_builder& timestamp_type(data_type type) except + - - orc_reader_options build() except + + stripes(vector[vector[size_type]] strps) except +libcudf_exception_handler + orc_reader_options_builder& skip_rows( + int64_t rows + ) except +libcudf_exception_handler + orc_reader_options_builder& num_rows( + int64_t nrows + ) except +libcudf_exception_handler + orc_reader_options_builder& use_index( + bool val + ) except +libcudf_exception_handler + orc_reader_options_builder& use_np_dtypes( + bool val + ) except +libcudf_exception_handler + orc_reader_options_builder& timestamp_type( + data_type type + ) except +libcudf_exception_handler + + orc_reader_options build() except +libcudf_exception_handler cdef cudf_io_types.table_with_metadata read_orc( orc_reader_options opts - ) except + + ) except +libcudf_exception_handler cdef cppclass orc_writer_options: orc_writer_options() - cudf_io_types.sink_info get_sink() except + - cudf_io_types.compression_type get_compression() except + - bool is_enabled_statistics() except + - size_t get_stripe_size_bytes() except + - size_type get_stripe_size_rows() except + - size_type get_row_index_stride() except + - cudf_table_view.table_view get_table() except + + cudf_io_types.sink_info get_sink() except +libcudf_exception_handler + cudf_io_types.compression_type get_compression()\ + except +libcudf_exception_handler + bool is_enabled_statistics() except +libcudf_exception_handler + size_t get_stripe_size_bytes() except +libcudf_exception_handler + size_type get_stripe_size_rows() except +libcudf_exception_handler + size_type get_row_index_stride() except +libcudf_exception_handler + cudf_table_view.table_view get_table() except +libcudf_exception_handler const optional[cudf_io_types.table_input_metadata]& get_metadata( - ) except + + ) except +libcudf_exception_handler # setter - void set_compression(cudf_io_types.compression_type comp) except + - void enable_statistics(bool val) except + - void set_stripe_size_bytes(size_t val) except + - void set_stripe_size_rows(size_type val) except + - void set_row_index_stride(size_type val) except + - void set_table(cudf_table_view.table_view tbl) except + - void set_metadata(cudf_io_types.table_input_metadata meta) except + - void set_key_value_metadata(map[string, string] kvm) except + + void set_compression( + cudf_io_types.compression_type comp + ) except +libcudf_exception_handler + void enable_statistics(bool val) except +libcudf_exception_handler + void set_stripe_size_bytes(size_t val) except +libcudf_exception_handler + void set_stripe_size_rows(size_type val) except +libcudf_exception_handler + void set_row_index_stride(size_type val) except +libcudf_exception_handler + void set_table(cudf_table_view.table_view tbl) except +libcudf_exception_handler + void set_metadata( + cudf_io_types.table_input_metadata meta + ) except +libcudf_exception_handler + void set_key_value_metadata( + map[string, string] kvm + ) except +libcudf_exception_handler @staticmethod orc_writer_options_builder builder( cudf_io_types.sink_info &sink, cudf_table_view.table_view &tbl - ) except + + ) except +libcudf_exception_handler cdef cppclass orc_writer_options_builder: # setter orc_writer_options_builder& compression( cudf_io_types.compression_type comp - ) except + + ) except +libcudf_exception_handler orc_writer_options_builder& enable_statistics( cudf_io_types.statistics_freq val - ) except + - orc_writer_options_builder& stripe_size_bytes(size_t val) except + - orc_writer_options_builder& stripe_size_rows(size_type val) except + - orc_writer_options_builder& row_index_stride(size_type val) except + + ) except +libcudf_exception_handler + orc_writer_options_builder& stripe_size_bytes( + size_t val + ) except +libcudf_exception_handler + orc_writer_options_builder& stripe_size_rows( + size_type val + ) except +libcudf_exception_handler + orc_writer_options_builder& row_index_stride( + size_type val + ) except +libcudf_exception_handler orc_writer_options_builder& table( cudf_table_view.table_view tbl - ) except + + ) except +libcudf_exception_handler orc_writer_options_builder& metadata( cudf_io_types.table_input_metadata meta - ) except + + ) except +libcudf_exception_handler orc_writer_options_builder& key_value_metadata( map[string, string] kvm - ) except + + ) except +libcudf_exception_handler - orc_writer_options build() except + + orc_writer_options build() except +libcudf_exception_handler - cdef void write_orc(orc_writer_options options) except + + cdef void write_orc( + orc_writer_options options + ) except +libcudf_exception_handler cdef cppclass chunked_orc_writer_options: - chunked_orc_writer_options() except + - cudf_io_types.sink_info get_sink() except + - cudf_io_types.compression_type get_compression() except + - bool enable_statistics() except + - size_t stripe_size_bytes() except + - size_type stripe_size_rows() except + - size_type row_index_stride() except + - cudf_table_view.table_view get_table() except + + chunked_orc_writer_options() except +libcudf_exception_handler + cudf_io_types.sink_info get_sink() except +libcudf_exception_handler + cudf_io_types.compression_type get_compression()\ + except +libcudf_exception_handler + bool enable_statistics() except +libcudf_exception_handler + size_t stripe_size_bytes() except +libcudf_exception_handler + size_type stripe_size_rows() except +libcudf_exception_handler + size_type row_index_stride() except +libcudf_exception_handler + cudf_table_view.table_view get_table() except +libcudf_exception_handler const optional[cudf_io_types.table_input_metadata]& get_metadata( - ) except + + ) except +libcudf_exception_handler # setter - void set_compression(cudf_io_types.compression_type comp) except + - void enable_statistics(bool val) except + - void set_stripe_size_bytes(size_t val) except + - void set_stripe_size_rows(size_type val) except + - void set_row_index_stride(size_type val) except + - void set_table(cudf_table_view.table_view tbl) except + + void set_compression( + cudf_io_types.compression_type comp + ) except +libcudf_exception_handler + void enable_statistics(bool val) except +libcudf_exception_handler + void set_stripe_size_bytes(size_t val) except +libcudf_exception_handler + void set_stripe_size_rows(size_type val) except +libcudf_exception_handler + void set_row_index_stride(size_type val) except +libcudf_exception_handler + void set_table(cudf_table_view.table_view tbl) except +libcudf_exception_handler void set_metadata( cudf_io_types.table_input_metadata meta - ) except + - void set_key_value_metadata(map[string, string] kvm) except + + ) except +libcudf_exception_handler + void set_key_value_metadata( + map[string, string] kvm + ) except +libcudf_exception_handler @staticmethod chunked_orc_writer_options_builder builder( cudf_io_types.sink_info &sink - ) except + + ) except +libcudf_exception_handler cdef cppclass chunked_orc_writer_options_builder: # setter chunked_orc_writer_options_builder& compression( cudf_io_types.compression_type comp - ) except + + ) except +libcudf_exception_handler chunked_orc_writer_options_builder& enable_statistics( cudf_io_types.statistics_freq val - ) except + - orc_writer_options_builder& stripe_size_bytes(size_t val) except + - orc_writer_options_builder& stripe_size_rows(size_type val) except + - orc_writer_options_builder& row_index_stride(size_type val) except + + ) except +libcudf_exception_handler + orc_writer_options_builder& stripe_size_bytes( + size_t val + ) except +libcudf_exception_handler + orc_writer_options_builder& stripe_size_rows( + size_type val + ) except +libcudf_exception_handler + orc_writer_options_builder& row_index_stride( + size_type val + ) except +libcudf_exception_handler chunked_orc_writer_options_builder& table( cudf_table_view.table_view tbl - ) except + + ) except +libcudf_exception_handler chunked_orc_writer_options_builder& metadata( cudf_io_types.table_input_metadata meta - ) except + + ) except +libcudf_exception_handler chunked_orc_writer_options_builder& key_value_metadata( map[string, string] kvm - ) except + + ) except +libcudf_exception_handler - chunked_orc_writer_options build() except + + chunked_orc_writer_options build() except +libcudf_exception_handler cdef cppclass orc_chunked_writer: - orc_chunked_writer() except + - orc_chunked_writer(chunked_orc_writer_options args) except + + orc_chunked_writer() except +libcudf_exception_handler + orc_chunked_writer( + chunked_orc_writer_options args + ) except +libcudf_exception_handler orc_chunked_writer& write( cudf_table_view.table_view table_, - ) except + - void close() except + + ) except +libcudf_exception_handler + void close() except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd b/python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd index 9302ffe2f80..38954d22676 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd @@ -1,10 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t, int64_t, uint32_t, uint64_t from libcpp cimport bool from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.io cimport types as cudf_io_types from pylibcudf.variant cimport monostate, variant @@ -69,4 +69,4 @@ cdef extern from "cudf/io/orc_metadata.hpp" \ cdef parsed_orc_statistics read_parsed_orc_statistics( cudf_io_types.source_info src_info - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd b/python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd index de6a6c1e82d..110c9d4a0b9 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int64_t, uint8_t from libcpp cimport bool from libcpp.functional cimport reference_wrapper @@ -8,6 +7,7 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.expressions cimport expression from pylibcudf.libcudf.io.types cimport ( compression_type, @@ -25,232 +25,241 @@ from pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: cdef cppclass parquet_reader_options: - parquet_reader_options() except + - source_info get_source_info() except + - vector[vector[size_type]] get_row_groups() except + - const optional[reference_wrapper[expression]]& get_filter() except + - data_type get_timestamp_type() except + - bool is_enabled_use_pandas_metadata() except + - bool is_enabled_arrow_schema() except + - bool is_enabled_allow_mismatched_pq_schemas() except + + parquet_reader_options() except +libcudf_exception_handler + source_info get_source_info() except +libcudf_exception_handler + vector[vector[size_type]] get_row_groups() except +libcudf_exception_handler + const optional[reference_wrapper[expression]]& get_filter()\ + except +libcudf_exception_handler + data_type get_timestamp_type() except +libcudf_exception_handler + bool is_enabled_use_pandas_metadata() except +libcudf_exception_handler + bool is_enabled_arrow_schema() except +libcudf_exception_handler + bool is_enabled_allow_mismatched_pq_schemas() except +libcudf_exception_handler # setter - void set_filter(expression &filter) except + - void set_columns(vector[string] col_names) except + - void set_num_rows(size_type val) except + - void set_row_groups(vector[vector[size_type]] row_grp) except + - void set_skip_rows(int64_t val) except + - void enable_use_arrow_schema(bool val) except + - void enable_allow_mismatched_pq_schemas(bool val) except + - void enable_use_pandas_metadata(bool val) except + - void set_timestamp_type(data_type type) except + + void set_filter(expression &filter) except +libcudf_exception_handler + void set_columns(vector[string] col_names) except +libcudf_exception_handler + void set_num_rows(size_type val) except +libcudf_exception_handler + void set_row_groups( + vector[vector[size_type]] row_grp + ) except +libcudf_exception_handler + void set_skip_rows(int64_t val) except +libcudf_exception_handler + void enable_use_arrow_schema(bool val) except +libcudf_exception_handler + void enable_allow_mismatched_pq_schemas( + bool val + ) except +libcudf_exception_handler + void enable_use_pandas_metadata(bool val) except +libcudf_exception_handler + void set_timestamp_type(data_type type) except +libcudf_exception_handler @staticmethod parquet_reader_options_builder builder( source_info src - ) except + + ) except +libcudf_exception_handler cdef cppclass parquet_reader_options_builder: - parquet_reader_options_builder() except + + parquet_reader_options_builder() except +libcudf_exception_handler parquet_reader_options_builder( source_info src - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& columns( vector[string] col_names - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& row_groups( vector[vector[size_type]] row_grp - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& convert_strings_to_categories( bool val - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& use_pandas_metadata( bool val - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& use_arrow_schema( bool val - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& allow_mismatched_pq_schemas( bool val - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& timestamp_type( data_type type - ) except + + ) except +libcudf_exception_handler parquet_reader_options_builder& filter( const expression & f - ) except + - parquet_reader_options build() except + + ) except +libcudf_exception_handler + parquet_reader_options build() except +libcudf_exception_handler cdef table_with_metadata read_parquet( - parquet_reader_options args) except + + parquet_reader_options args) except +libcudf_exception_handler cdef cppclass parquet_writer_options_base: - parquet_writer_options_base() except + - sink_info get_sink_info() except + - compression_type get_compression() except + - statistics_freq get_stats_level() except + + parquet_writer_options_base() except +libcudf_exception_handler + sink_info get_sink_info() except +libcudf_exception_handler + compression_type get_compression() except +libcudf_exception_handler + statistics_freq get_stats_level() except +libcudf_exception_handler const optional[table_input_metadata]& get_metadata( - ) except + - size_t get_row_group_size_bytes() except + - size_type get_row_group_size_rows() except + - size_t get_max_page_size_bytes() except + - size_type get_max_page_size_rows() except + - size_t get_max_dictionary_size() except + - bool is_enabled_write_arrow_schema() except + + ) except +libcudf_exception_handler + size_t get_row_group_size_bytes() except +libcudf_exception_handler + size_type get_row_group_size_rows() except +libcudf_exception_handler + size_t get_max_page_size_bytes() except +libcudf_exception_handler + size_type get_max_page_size_rows() except +libcudf_exception_handler + size_t get_max_dictionary_size() except +libcudf_exception_handler + bool is_enabled_write_arrow_schema() except +libcudf_exception_handler void set_metadata( table_input_metadata m - ) except + + ) except +libcudf_exception_handler void set_key_value_metadata( vector[map[string, string]] kvm - ) except + + ) except +libcudf_exception_handler void set_stats_level( statistics_freq sf - ) except + + ) except +libcudf_exception_handler void set_compression( compression_type compression - ) except + + ) except +libcudf_exception_handler void set_int96_timestamps( bool enabled - ) except + + ) except +libcudf_exception_handler void set_utc_timestamps( bool enabled - ) except + - void set_row_group_size_bytes(size_t val) except + - void set_row_group_size_rows(size_type val) except + - void set_max_page_size_bytes(size_t val) except + - void set_max_page_size_rows(size_type val) except + - void set_max_dictionary_size(size_t val) except + - void enable_write_v2_headers(bool val) except + - void enable_write_arrow_schema(bool val) except + - void set_dictionary_policy(dictionary_policy policy) except + + ) except +libcudf_exception_handler + void set_row_group_size_bytes(size_t val) except +libcudf_exception_handler + void set_row_group_size_rows(size_type val) except +libcudf_exception_handler + void set_max_page_size_bytes(size_t val) except +libcudf_exception_handler + void set_max_page_size_rows(size_type val) except +libcudf_exception_handler + void set_max_dictionary_size(size_t val) except +libcudf_exception_handler + void enable_write_v2_headers(bool val) except +libcudf_exception_handler + void enable_write_arrow_schema(bool val) except +libcudf_exception_handler + void set_dictionary_policy( + dictionary_policy policy + ) except +libcudf_exception_handler cdef cppclass parquet_writer_options(parquet_writer_options_base): - parquet_writer_options() except + - table_view get_table() except + - string get_column_chunks_file_paths() except + + parquet_writer_options() except +libcudf_exception_handler + table_view get_table() except +libcudf_exception_handler + string get_column_chunks_file_paths() except +libcudf_exception_handler void set_partitions( vector[partition_info] partitions - ) except + + ) except +libcudf_exception_handler void set_column_chunks_file_paths( vector[string] column_chunks_file_paths - ) except + + ) except +libcudf_exception_handler @staticmethod parquet_writer_options_builder builder( sink_info sink_, table_view table_ - ) except + + ) except +libcudf_exception_handler cdef cppclass parquet_writer_options_builder_base[BuilderT, OptionsT]: - parquet_writer_options_builder_base() except + + parquet_writer_options_builder_base() except +libcudf_exception_handler BuilderT& metadata( table_input_metadata m - ) except + + ) except +libcudf_exception_handler BuilderT& key_value_metadata( vector[map[string, string]] kvm - ) except + + ) except +libcudf_exception_handler BuilderT& stats_level( statistics_freq sf - ) except + + ) except +libcudf_exception_handler BuilderT& compression( compression_type compression - ) except + + ) except +libcudf_exception_handler BuilderT& int96_timestamps( bool enabled - ) except + + ) except +libcudf_exception_handler BuilderT& utc_timestamps( bool enabled - ) except + + ) except +libcudf_exception_handler BuilderT& write_arrow_schema( bool enabled - ) except + + ) except +libcudf_exception_handler BuilderT& row_group_size_bytes( size_t val - ) except + + ) except +libcudf_exception_handler BuilderT& row_group_size_rows( size_type val - ) except + + ) except +libcudf_exception_handler BuilderT& max_page_size_bytes( size_t val - ) except + + ) except +libcudf_exception_handler BuilderT& max_page_size_rows( size_type val - ) except + + ) except +libcudf_exception_handler BuilderT& max_dictionary_size( size_t val - ) except + + ) except +libcudf_exception_handler BuilderT& write_v2_headers( bool val - ) except + + ) except +libcudf_exception_handler BuilderT& dictionary_policy( dictionary_policy val - ) except + - OptionsT build() except + + ) except +libcudf_exception_handler + OptionsT build() except +libcudf_exception_handler cdef cppclass parquet_writer_options_builder( parquet_writer_options_builder_base[parquet_writer_options_builder, parquet_writer_options]): - parquet_writer_options_builder() except + + parquet_writer_options_builder() except +libcudf_exception_handler parquet_writer_options_builder( sink_info sink_, table_view table_ - ) except + + ) except +libcudf_exception_handler parquet_writer_options_builder& partitions( vector[partition_info] partitions - ) except + + ) except +libcudf_exception_handler parquet_writer_options_builder& column_chunks_file_paths( vector[string] column_chunks_file_paths - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[vector[uint8_t]] write_parquet( parquet_writer_options args - ) except + + ) except +libcudf_exception_handler cdef cppclass chunked_parquet_writer_options(parquet_writer_options_base): - chunked_parquet_writer_options() except + + chunked_parquet_writer_options() except +libcudf_exception_handler @staticmethod chunked_parquet_writer_options_builder builder( sink_info sink_, - ) except + + ) except +libcudf_exception_handler cdef cppclass chunked_parquet_writer_options_builder( parquet_writer_options_builder_base[chunked_parquet_writer_options_builder, chunked_parquet_writer_options] ): - chunked_parquet_writer_options_builder() except + + chunked_parquet_writer_options_builder() except +libcudf_exception_handler chunked_parquet_writer_options_builder( sink_info sink_, - ) except + + ) except +libcudf_exception_handler cdef cppclass parquet_chunked_writer: - parquet_chunked_writer() except + - parquet_chunked_writer(chunked_parquet_writer_options args) except + + parquet_chunked_writer() except +libcudf_exception_handler + parquet_chunked_writer( + chunked_parquet_writer_options args + ) except +libcudf_exception_handler parquet_chunked_writer& write( table_view table_, - ) except + + ) except +libcudf_exception_handler parquet_chunked_writer& write( const table_view& table_, const vector[partition_info]& partitions, - ) except + + ) except +libcudf_exception_handler unique_ptr[vector[uint8_t]] close( vector[string] column_chunks_file_paths, - ) except + + ) except +libcudf_exception_handler cdef cppclass chunked_parquet_reader: - chunked_parquet_reader() except + + chunked_parquet_reader() except +libcudf_exception_handler chunked_parquet_reader( size_t chunk_read_limit, - const parquet_reader_options& options) except + + const parquet_reader_options& options) except +libcudf_exception_handler chunked_parquet_reader( size_t chunk_read_limit, size_t pass_read_limit, - const parquet_reader_options& options) except + - bool has_next() except + - table_with_metadata read_chunk() except + + const parquet_reader_options& options) except +libcudf_exception_handler + bool has_next() except +libcudf_exception_handler + table_with_metadata read_chunk() except +libcudf_exception_handler cdef unique_ptr[vector[uint8_t]] merge_row_group_metadata( const vector[unique_ptr[vector[uint8_t]]]& metadata_list - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd b/python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd index b0ce13e4492..cdc87093f3a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd @@ -1,31 +1,34 @@ # Copyright (c) 2024, NVIDIA CORPORATION. - from libc.stdint cimport int64_t from libcpp.string cimport string from libcpp.unordered_map cimport unordered_map from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport size_type from pylibcudf.libcudf.io.types cimport source_info cdef extern from "cudf/io/parquet_metadata.hpp" namespace "cudf::io" nogil: cdef cppclass parquet_column_schema: - parquet_column_schema() except+ - string name() except+ - size_type num_children() except+ - parquet_column_schema child(int idx) except+ - vector[parquet_column_schema] children() except+ + parquet_column_schema() except +libcudf_exception_handler + string name() except +libcudf_exception_handler + size_type num_children() except +libcudf_exception_handler + parquet_column_schema child(int idx) except +libcudf_exception_handler + vector[parquet_column_schema] children() except +libcudf_exception_handler cdef cppclass parquet_schema: - parquet_schema() except+ - parquet_column_schema root() except+ + parquet_schema() except +libcudf_exception_handler + parquet_column_schema root() except +libcudf_exception_handler cdef cppclass parquet_metadata: - parquet_metadata() except+ - parquet_schema schema() except+ - int64_t num_rows() except+ - size_type num_rowgroups() except+ - unordered_map[string, string] metadata() except+ - vector[unordered_map[string, int64_t]] rowgroup_metadata() except+ + parquet_metadata() except +libcudf_exception_handler + parquet_schema schema() except +libcudf_exception_handler + int64_t num_rows() except +libcudf_exception_handler + size_type num_rowgroups() except +libcudf_exception_handler + unordered_map[string, string] metadata() except +libcudf_exception_handler + vector[unordered_map[string, int64_t]] rowgroup_metadata()\ + except +libcudf_exception_handler - cdef parquet_metadata read_parquet_metadata(source_info src_info) except+ + cdef parquet_metadata read_parquet_metadata( + source_info src_info + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/text.pxd b/python/pylibcudf/pylibcudf/libcudf/io/text.pxd index 14397ef970d..b49fede21b3 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/text.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/text.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint64_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column @@ -11,27 +11,37 @@ cdef extern from "cudf/io/text/byte_range_info.hpp" \ namespace "cudf::io::text" nogil: cdef cppclass byte_range_info: - byte_range_info() except + - byte_range_info(size_t offset, size_t size) except + + byte_range_info() except +libcudf_exception_handler + byte_range_info( + size_t offset, size_t size + ) except +libcudf_exception_handler cdef extern from "cudf/io/text/data_chunk_source.hpp" \ namespace "cudf::io::text" nogil: cdef cppclass data_chunk_source: - data_chunk_source() except + + data_chunk_source() except +libcudf_exception_handler cdef extern from "cudf/io/text/data_chunk_source_factories.hpp" \ namespace "cudf::io::text" nogil: - unique_ptr[data_chunk_source] make_source(string data) except + + unique_ptr[data_chunk_source] make_source( + string data + ) except +libcudf_exception_handler unique_ptr[data_chunk_source] \ - make_source_from_file(string filename) except + + make_source_from_file( + string filename + ) except +libcudf_exception_handler unique_ptr[data_chunk_source] \ - make_source_from_bgzip_file(string filename) except + + make_source_from_bgzip_file( + string filename + ) except +libcudf_exception_handler unique_ptr[data_chunk_source] \ - make_source_from_bgzip_file(string filename, - uint64_t virtual_begin, - uint64_t virtual_end) except + + make_source_from_bgzip_file( + string filename, + uint64_t virtual_begin, + uint64_t virtual_end + ) except +libcudf_exception_handler cdef extern from "cudf/io/text/multibyte_split.hpp" \ @@ -41,8 +51,10 @@ cdef extern from "cudf/io/text/multibyte_split.hpp" \ byte_range_info byte_range bool strip_delimiters - parse_options() except + + parse_options() except +libcudf_exception_handler - unique_ptr[column] multibyte_split(data_chunk_source source, - string delimiter, - parse_options options) except + + unique_ptr[column] multibyte_split( + data_chunk_source source, + string delimiter, + parse_options options + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd b/python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd index 676901efcec..b59692ebdac 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.table.table cimport table @@ -11,4 +11,4 @@ cdef extern from "cudf/timezone.hpp" namespace "cudf" nogil: unique_ptr[table] make_timezone_transition_table( optional[string] tzif_dir, string timezone_name - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/io/types.pxd b/python/pylibcudf/pylibcudf/libcudf/io/types.pxd index 5f3be2f0727..e02cb79e10d 100644 --- a/python/pylibcudf/pylibcudf/libcudf/io/types.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/types.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.io.data_sink as cudf_io_data_sink cimport pylibcudf.libcudf.io.datasource as cudf_io_datasource cimport pylibcudf.libcudf.table.table_view as cudf_table_view @@ -10,6 +9,7 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.unordered_map cimport unordered_map from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.table.table cimport table from pylibcudf.libcudf.types cimport size_type @@ -72,7 +72,7 @@ cdef extern from "cudf/io/types.hpp" \ vector[column_name_info] children cdef cppclass table_metadata: - table_metadata() except + + table_metadata() except +libcudf_exception_handler map[string, string] user_data vector[unordered_map[string, string]] per_file_user_data @@ -97,8 +97,10 @@ cdef extern from "cudf/io/types.hpp" \ string get_name() cdef cppclass table_input_metadata: - table_input_metadata() except + - table_input_metadata(const cudf_table_view.table_view& table) except + + table_input_metadata() except +libcudf_exception_handler + table_input_metadata( + const cudf_table_view.table_view& table + ) except +libcudf_exception_handler vector[column_in_metadata] column_metadata @@ -107,7 +109,9 @@ cdef extern from "cudf/io/types.hpp" \ size_type num_rows partition_info() - partition_info(size_type start_row, size_type num_rows) except + + partition_info( + size_type start_row, size_type num_rows + ) except +libcudf_exception_handler cdef cppclass host_buffer: const char* data @@ -117,21 +121,33 @@ cdef extern from "cudf/io/types.hpp" \ host_buffer(const char* data, size_t size) cdef cppclass source_info: - const vector[string]& filepaths() except + - - source_info() except + - source_info(const vector[string] &filepaths) except + - source_info(const vector[host_buffer] &host_buffers) except + - source_info(cudf_io_datasource.datasource *source) except + - source_info(const vector[cudf_io_datasource.datasource*] &datasources) except + + const vector[string]& filepaths() except +libcudf_exception_handler + + source_info() except +libcudf_exception_handler + source_info( + const vector[string] &filepaths + ) except +libcudf_exception_handler + source_info( + const vector[host_buffer] &host_buffers + ) except +libcudf_exception_handler + source_info( + cudf_io_datasource.datasource *source + ) except +libcudf_exception_handler + source_info( + const vector[cudf_io_datasource.datasource*] &datasources + ) except +libcudf_exception_handler cdef cppclass sink_info: const vector[string]& filepaths() const vector[cudf_io_data_sink.data_sink *]& user_sinks() - sink_info() except + - sink_info(string file_path) except + - sink_info(vector[string] file_path) except + - sink_info(vector[char] * buffer) except + - sink_info(cudf_io_data_sink.data_sink * user_sink) except + - sink_info(vector[cudf_io_data_sink.data_sink *] user_sink) except + + sink_info() except +libcudf_exception_handler + sink_info(string file_path) except +libcudf_exception_handler + sink_info(vector[string] file_path) except +libcudf_exception_handler + sink_info(vector[char] * buffer) except +libcudf_exception_handler + sink_info( + cudf_io_data_sink.data_sink * user_sink + ) except +libcudf_exception_handler + sink_info( + vector[cudf_io_data_sink.data_sink *] user_sink + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/join.pxd b/python/pylibcudf/pylibcudf/libcudf/join.pxd index f8e592c2104..5a36b05fd9f 100644 --- a/python/pylibcudf/pylibcudf/libcudf/join.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/join.pxd @@ -22,57 +22,57 @@ cdef extern from "cudf/join.hpp" namespace "cudf" nogil: cdef gather_map_pair_type inner_join( const table_view left_keys, const table_view right_keys, - ) except + + ) except +libcudf_exception_handler cdef gather_map_pair_type left_join( const table_view left_keys, const table_view right_keys, - ) except + + ) except +libcudf_exception_handler cdef gather_map_pair_type full_join( const table_view left_keys, const table_view right_keys, - ) except + + ) except +libcudf_exception_handler cdef gather_map_type left_semi_join( const table_view left_keys, const table_view right_keys, - ) except + + ) except +libcudf_exception_handler cdef gather_map_type left_anti_join( const table_view left_keys, const table_view right_keys, - ) except + + ) except +libcudf_exception_handler cdef gather_map_pair_type inner_join( const table_view left_keys, const table_view right_keys, null_equality nulls_equal, - ) except + + ) except +libcudf_exception_handler cdef gather_map_pair_type left_join( const table_view left_keys, const table_view right_keys, null_equality nulls_equal, - ) except + + ) except +libcudf_exception_handler cdef gather_map_pair_type full_join( const table_view left_keys, const table_view right_keys, null_equality nulls_equal, - ) except + + ) except +libcudf_exception_handler cdef gather_map_type left_semi_join( const table_view left_keys, const table_view right_keys, null_equality nulls_equal, - ) except + + ) except +libcudf_exception_handler cdef gather_map_type left_anti_join( const table_view left_keys, const table_view right_keys, null_equality nulls_equal, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] cross_join( const table_view left, diff --git a/python/pylibcudf/pylibcudf/libcudf/json.pxd b/python/pylibcudf/pylibcudf/libcudf/json.pxd index 571ba7be7af..d5bdd6d299a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/json.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/json.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport scalar, string_scalar @@ -10,18 +10,20 @@ from pylibcudf.libcudf.scalar.scalar cimport scalar, string_scalar cdef extern from "cudf/json/json.hpp" namespace "cudf" nogil: cdef cppclass get_json_object_options: - get_json_object_options() except + + get_json_object_options() except +libcudf_exception_handler # getters - bool get_allow_single_quotes() except + - bool get_strip_quotes_from_single_strings() except + - bool get_missing_fields_as_nulls() except + + bool get_allow_single_quotes() except +libcudf_exception_handler + bool get_strip_quotes_from_single_strings() except +libcudf_exception_handler + bool get_missing_fields_as_nulls() except +libcudf_exception_handler # setters - void set_allow_single_quotes(bool val) except + - void set_strip_quotes_from_single_strings(bool val) except + - void set_missing_fields_as_nulls(bool val) except + + void set_allow_single_quotes(bool val) except +libcudf_exception_handler + void set_strip_quotes_from_single_strings( + bool val + ) except +libcudf_exception_handler + void set_missing_fields_as_nulls(bool val) except +libcudf_exception_handler cdef unique_ptr[column] get_json_object( column_view col, string_scalar json_path, get_json_object_options options, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/labeling.pxd b/python/pylibcudf/pylibcudf/libcudf/labeling.pxd index 400c4282f7a..e5dbec879ce 100644 --- a/python/pylibcudf/pylibcudf/libcudf/labeling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/labeling.pxd @@ -1,6 +1,7 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp cimport int from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -16,4 +17,4 @@ cdef extern from "cudf/labeling/label_bins.hpp" namespace "cudf" nogil: inclusive left_inclusive, const column_view &right_edges, inclusive right_inclusive - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd index 09a5d84c64f..3e4c88d62b0 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd @@ -2,6 +2,7 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table_view cimport table_view @@ -16,13 +17,13 @@ cdef extern from "cudf/lists/combine.hpp" namespace \ cdef unique_ptr[column] concatenate_rows( const table_view input_table - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] concatenate_list_elements( const table_view input_table, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] concatenate_list_elements( const column_view input_table, concatenate_null_policy null_policy - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd index 81a5ad46389..13a32d46c7a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from pylibcudf.exception_handler cimport libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd index e283551ed0c..64c75ccabd3 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd @@ -1,9 +1,11 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view cdef extern from "cudf/lists/count_elements.hpp" namespace "cudf::lists" nogil: - cdef unique_ptr[column] count_elements(const lists_column_view&) except + + cdef unique_ptr[column] count_elements( + const lists_column_view& + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd index c64b2715cca..adec02caad1 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.table.table cimport table from pylibcudf.libcudf.table.table_view cimport table_view from pylibcudf.libcudf.types cimport size_type @@ -10,4 +10,4 @@ cdef extern from "cudf/lists/explode.hpp" namespace "cudf" nogil: cdef unique_ptr[table] explode_outer( const table_view, size_type explode_column_idx, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd index 2ea060d87de..046bb51c68e 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column, column_view from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view from pylibcudf.libcudf.types cimport size_type @@ -10,8 +10,8 @@ cdef extern from "cudf/lists/extract.hpp" namespace "cudf::lists" nogil: cdef unique_ptr[column] extract_list_element( const lists_column_view&, size_type - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] extract_list_element( const lists_column_view&, const column_view& - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd index 54f5a8409b6..35e2559d902 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -9,10 +9,10 @@ cdef extern from "cudf/lists/filling.hpp" namespace "cudf::lists" nogil: cdef unique_ptr[column] sequences( const column_view& starts, const column_view& sizes, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] sequences( const column_view& starts, const column_view& steps, const column_view& sizes, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd index a762c6aa333..69d5eda7e7e 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view @@ -9,4 +9,4 @@ cdef extern from "cudf/lists/gather.hpp" namespace "cudf::lists" nogil: cdef unique_ptr[column] segmented_gather( const lists_column_view& source_column, const lists_column_view& gather_map_list - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd index f43340a78b0..917245b3bef 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd @@ -1,5 +1,5 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, @@ -9,13 +9,19 @@ from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/lists/lists_column_view.hpp" namespace "cudf" nogil: cdef cppclass lists_column_view(column_view): - lists_column_view() except + - lists_column_view(const lists_column_view& lists_column) except + - lists_column_view(const column_view& lists_column) except + - lists_column_view& operator=(const lists_column_view&) except + - column_view parent() except + - column_view offsets() except + - column_view child() except + + lists_column_view() except +libcudf_exception_handler + lists_column_view( + const lists_column_view& lists_colum + ) except +libcudf_exception_handler + lists_column_view( + const column_view& lists_column + ) except +libcudf_exception_handler + lists_column_view& operator=( + const lists_column_view& + ) except +libcudf_exception_handler + column_view parent() except +libcudf_exception_handler + column_view offsets() except +libcudf_exception_handler + column_view child() except +libcudf_exception_handler cdef enum: offsets_column_index "cudf::lists_column_view::offsets_column_index" diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd index 43b671ebfa0..1ae3b4409ef 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view @@ -8,4 +8,4 @@ from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view cdef extern from "cudf/lists/reverse.hpp" namespace "cudf::lists" nogil: cdef unique_ptr[column] reverse( const lists_column_view& lists_column, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd index 266f04ef6b3..1f4855bdbf3 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view from pylibcudf.libcudf.types cimport nan_equality, null_equality @@ -12,25 +12,25 @@ cdef extern from "cudf/lists/set_operations.hpp" namespace "cudf::lists" nogil: const lists_column_view& rhs, null_equality nulls_equal, nan_equality nans_equal - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] have_overlap( const lists_column_view& lhs, const lists_column_view& rhs, null_equality nulls_equal, nan_equality nans_equal - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] intersect_distinct( const lists_column_view& lhs, const lists_column_view& rhs, null_equality nulls_equal, nan_equality nans_equal - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] union_distinct( const lists_column_view& lhs, const lists_column_view& rhs, null_equality nulls_equal, nan_equality nans_equal - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd index ea45f999c47..344b55b402f 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view from pylibcudf.libcudf.types cimport null_order, order @@ -11,10 +11,10 @@ cdef extern from "cudf/lists/sorting.hpp" namespace "cudf::lists" nogil: const lists_column_view source_column, order column_order, null_order null_precedence - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] stable_sort_lists( const lists_column_view source_column, order column_order, null_order null_precedence - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd index d9df7c3ca2e..8341ac69bf5 100644 --- a/python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view from pylibcudf.libcudf.types cimport nan_equality, null_equality @@ -11,10 +11,10 @@ cdef extern from "cudf/lists/stream_compaction.hpp" \ cdef unique_ptr[column] apply_boolean_mask( const lists_column_view& lists_column, const lists_column_view& boolean_mask, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] distinct( const lists_column_view& lists_column, null_equality nulls_equal, nan_equality nans_equal - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/merge.pxd b/python/pylibcudf/pylibcudf/libcudf/merge.pxd index 6930b7a0d06..f546ae3bbdd 100644 --- a/python/pylibcudf/pylibcudf/libcudf/merge.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/merge.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.types as libcudf_types from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.table.table cimport table from pylibcudf.libcudf.table.table_view cimport table_view @@ -13,4 +13,4 @@ cdef extern from "cudf/merge.hpp" namespace "cudf" nogil: vector[libcudf_types.size_type] key_cols, vector[libcudf_types.order] column_order, vector[libcudf_types.null_order] null_precedence, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/null_mask.pxd b/python/pylibcudf/pylibcudf/libcudf/null_mask.pxd index 27af4a3bdb1..5b49ddc3bbe 100644 --- a/python/pylibcudf/pylibcudf/libcudf/null_mask.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/null_mask.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp.pair cimport pair +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table_view cimport table_view from pylibcudf.libcudf.types cimport bitmask_type, mask_state, size_type @@ -12,21 +12,21 @@ from rmm.librmm.device_buffer cimport device_buffer cdef extern from "cudf/null_mask.hpp" namespace "cudf" nogil: cdef device_buffer copy_bitmask "cudf::copy_bitmask" ( column_view view - ) except + + ) except +libcudf_exception_handler cdef size_t bitmask_allocation_size_bytes ( size_type number_of_bits, size_t padding_boundary - ) except + + ) except +libcudf_exception_handler cdef size_t bitmask_allocation_size_bytes ( size_type number_of_bits - ) except + + ) except +libcudf_exception_handler cdef device_buffer create_null_mask ( size_type size, mask_state state - ) except + + ) except +libcudf_exception_handler cdef pair[device_buffer, size_type] bitmask_and( table_view view diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd index fd768d22704..c835c8249ca 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -14,10 +14,10 @@ cdef extern from "nvtext/byte_pair_encoding.hpp" namespace "nvtext" nogil: cdef unique_ptr[bpe_merge_pairs] load_merge_pairs( const column_view &merge_pairs - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] byte_pair_encoding( const column_view &strings, const bpe_merge_pairs &merge_pairs, const string_scalar &separator - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd index d459372fb8f..fbb1c0b2f4c 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -11,8 +11,8 @@ cdef extern from "nvtext/edit_distance.hpp" namespace "nvtext" nogil: cdef unique_ptr[column] edit_distance( const column_view & strings, const column_view & targets - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] edit_distance_matrix( const column_view & strings - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd index eefae746662..c7bd4da5441 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -13,14 +13,14 @@ cdef extern from "nvtext/generate_ngrams.hpp" namespace "nvtext" nogil: const column_view &strings, size_type ngrams, const string_scalar & separator - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] generate_character_ngrams( const column_view &strings, size_type ngrams - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] hash_character_ngrams( const column_view &strings, size_type ngrams - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd index 16c5f7f575e..d40943f2649 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport size_type @@ -12,4 +12,4 @@ cdef extern from "nvtext/jaccard.hpp" namespace "nvtext" nogil: const column_view &input1, const column_view &input2, size_type width - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd index ebf8eda1ce3..8570531dfde 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint32_t, uint64_t from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport numeric_scalar @@ -14,13 +14,13 @@ cdef extern from "nvtext/minhash.hpp" namespace "nvtext" nogil: const column_view &strings, const numeric_scalar[uint32_t] seed, const size_type width, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] minhash( const column_view &strings, const column_view &seeds, const size_type width, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] minhash_permuted( const column_view &strings, @@ -34,13 +34,13 @@ cdef extern from "nvtext/minhash.hpp" namespace "nvtext" nogil: const column_view &strings, const column_view &seeds, const size_type width, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] minhash64( const column_view &strings, const numeric_scalar[uint64_t] seed, const size_type width, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] minhash64_permuted( const column_view &strings, @@ -53,9 +53,9 @@ cdef extern from "nvtext/minhash.hpp" namespace "nvtext" nogil: cdef unique_ptr[column] word_minhash( const column_view &input, const column_view &seeds - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] word_minhash64( const column_view &input, const column_view &seeds - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd index 89f6e5edfc4..fae8fd1e59a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -14,4 +14,4 @@ cdef extern from "nvtext/ngrams_tokenize.hpp" namespace "nvtext" nogil: size_type ngrams, const string_scalar & delimiter, const string_scalar & separator - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd index cbf121920e1..f8b082c8429 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -10,9 +10,9 @@ cdef extern from "nvtext/normalize.hpp" namespace "nvtext" nogil: cdef unique_ptr[column] normalize_spaces( const column_view & strings - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] normalize_characters( const column_view & strings, bool do_lower_case - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd index 6bcfa1d9380..82983aaf618 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -14,11 +14,11 @@ cdef extern from "nvtext/replace.hpp" namespace "nvtext" nogil: const column_view & targets, const column_view & replacements, const string_scalar & delimiter - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] filter_tokens( const column_view & strings, size_type min_token_length, const string_scalar & replacement, const string_scalar & delimiter - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd index be3a2d75718..1f944d95701 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport size_type @@ -15,16 +15,16 @@ cdef extern from "nvtext/stemmer.hpp" namespace "nvtext" nogil: cdef unique_ptr[column] porter_stemmer_measure( const column_view & strings - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] is_letter( column_view source_strings, letter_type ltype, - size_type character_index) except + + size_type character_index) except +libcudf_exception_handler cdef unique_ptr[column] is_letter( column_view source_strings, letter_type ltype, - column_view indices) except + + column_view indices) except +libcudf_exception_handler ctypedef int32_t underlying_type_t_letter_type diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd index 8dac86d688d..1ac69c87c4b 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint16_t, uint32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -31,7 +31,7 @@ cdef extern from "nvtext/subword_tokenize.hpp" namespace "nvtext" nogil: cdef unique_ptr[hashed_vocabulary] load_vocabulary_file( const string &filename_hashed_vocabulary - ) except + + ) except +libcudf_exception_handler cdef tokenizer_result subword_tokenize( const column_view & strings, @@ -40,7 +40,7 @@ cdef extern from "nvtext/subword_tokenize.hpp" namespace "nvtext" nogil: uint32_t stride, bool do_lower, bool do_truncate - ) except + + ) except +libcudf_exception_handler cdef tokenizer_result subword_tokenize( const column_view &strings, @@ -49,7 +49,7 @@ cdef extern from "nvtext/subword_tokenize.hpp" namespace "nvtext" nogil: uint32_t stride, bool do_lower, bool do_truncate - ) except + + ) except +libcudf_exception_handler cdef extern from "" namespace "std" nogil: cdef tokenizer_result move(tokenizer_result) diff --git a/python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd index 34c054cf36f..a8f9d0451bc 100644 --- a/python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -12,43 +12,43 @@ cdef extern from "nvtext/tokenize.hpp" namespace "nvtext" nogil: cdef unique_ptr[column] tokenize( const column_view & strings, const string_scalar & delimiter - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] tokenize( const column_view & strings, const column_view & delimiters - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] count_tokens( const column_view & strings, const string_scalar & delimiter - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] count_tokens( const column_view & strings, const column_view & delimiters - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] character_tokenize( const column_view & strings - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] detokenize( const column_view & strings, const column_view & row_indices, const string_scalar & separator - ) except + + ) except +libcudf_exception_handler cdef struct tokenize_vocabulary "nvtext::tokenize_vocabulary": pass cdef unique_ptr[tokenize_vocabulary] load_vocabulary( const column_view & strings - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] tokenize_with_vocabulary( const column_view & strings, const tokenize_vocabulary & vocabulary, const string_scalar & delimiter, size_type default_id - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/partitioning.pxd b/python/pylibcudf/pylibcudf/libcudf/partitioning.pxd index 89bddbffab5..04566b6e40a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/partitioning.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/partitioning.pxd @@ -1,10 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.types as libcudf_types from libc.stdint cimport uint32_t from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table cimport table @@ -17,18 +17,18 @@ cdef extern from "cudf/partitioning.hpp" namespace "cudf" nogil: const table_view& input, const vector[libcudf_types.size_type]& columns_to_hash, int num_partitions - ) except + + ) except +libcudf_exception_handler cdef pair[unique_ptr[table], vector[libcudf_types.size_type]] \ partition "cudf::partition" ( const table_view& t, const column_view& partition_map, int num_partitions - ) except + + ) except +libcudf_exception_handler cdef pair[unique_ptr[table], vector[libcudf_types.size_type]] \ round_robin_partition "cudf::round_robin_partition" ( const table_view& input, int num_partitions, int start_partition - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/quantiles.pxd b/python/pylibcudf/pylibcudf/libcudf/quantiles.pxd index cf2350fc36c..8f60302e776 100644 --- a/python/pylibcudf/pylibcudf/libcudf/quantiles.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/quantiles.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table cimport table @@ -24,7 +24,7 @@ cdef extern from "cudf/quantiles.hpp" namespace "cudf" nogil: interpolation interp, column_view ordered_indices, bool exact, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] quantiles ( table_view source_table, @@ -33,4 +33,4 @@ cdef extern from "cudf/quantiles.hpp" namespace "cudf" nogil: sorted is_input_sorted, vector[order] column_order, vector[null_order] null_precedence, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/reduce.pxd b/python/pylibcudf/pylibcudf/libcudf/reduce.pxd index 6d2f4bd23d1..ad79187b733 100644 --- a/python/pylibcudf/pylibcudf/libcudf/reduce.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/reduce.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport pair +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.aggregation cimport reduce_aggregation, scan_aggregation from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -15,7 +15,7 @@ cdef extern from "cudf/reduction.hpp" namespace "cudf" nogil: column_view col, const reduce_aggregation& agg, data_type type - ) except + + ) except +libcudf_exception_handler cpdef enum class scan_type(bool): INCLUSIVE "cudf::scan_type::INCLUSIVE", @@ -25,9 +25,9 @@ cdef extern from "cudf/reduction.hpp" namespace "cudf" nogil: column_view col, const scan_aggregation& agg, scan_type inclusive - ) except + + ) except +libcudf_exception_handler cdef pair[unique_ptr[scalar], unique_ptr[scalar]] cpp_minmax "cudf::minmax" ( column_view col - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/replace.pxd b/python/pylibcudf/pylibcudf/libcudf/replace.pxd index 4ac44fc946e..bef5a25367b 100644 --- a/python/pylibcudf/pylibcudf/libcudf/replace.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/replace.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport ( column_view, @@ -18,32 +18,32 @@ cdef extern from "cudf/replace.hpp" namespace "cudf" nogil: cdef unique_ptr[column] replace_nulls( column_view source_column, - column_view replacement_column) except + + column_view replacement_column) except +libcudf_exception_handler cdef unique_ptr[column] replace_nulls( column_view source_column, - scalar replacement) except + + scalar replacement) except +libcudf_exception_handler cdef unique_ptr[column] replace_nulls( column_view source_column, - replace_policy replace_policy) except + + replace_policy replace_policy) except +libcudf_exception_handler cdef unique_ptr[column] find_and_replace_all( column_view source_column, column_view values_to_replace, - column_view replacement_values) except + + column_view replacement_values) except +libcudf_exception_handler cdef unique_ptr[column] clamp( column_view source_column, scalar lo, scalar lo_replace, - scalar hi, scalar hi_replace) except + + scalar hi, scalar hi_replace) except +libcudf_exception_handler cdef unique_ptr[column] clamp( column_view source_column, - scalar lo, scalar hi) except + + scalar lo, scalar hi) except +libcudf_exception_handler cdef unique_ptr[column] normalize_nans_and_zeros( - column_view source_column) except + + column_view source_column) except +libcudf_exception_handler cdef void normalize_nans_and_zeros( - mutable_column_view source_column) except + + mutable_column_view source_column) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/reshape.pxd b/python/pylibcudf/pylibcudf/libcudf/reshape.pxd index 446a082ab1b..92ab4773940 100644 --- a/python/pylibcudf/pylibcudf/libcudf/reshape.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/reshape.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2019-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.table.table cimport table from pylibcudf.libcudf.table.table_view cimport table_view @@ -10,7 +10,7 @@ from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/reshape.hpp" namespace "cudf" nogil: cdef unique_ptr[column] interleave_columns( table_view source_table - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] tile( table_view source_table, size_type count - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/rolling.pxd b/python/pylibcudf/pylibcudf/libcudf/rolling.pxd index 9e76faa0eba..0fd7eeb73c0 100644 --- a/python/pylibcudf/pylibcudf/libcudf/rolling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/rolling.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.aggregation cimport rolling_aggregation from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -13,11 +13,11 @@ cdef extern from "cudf/rolling.hpp" namespace "cudf" nogil: column_view preceding_window, column_view following_window, size_type min_periods, - rolling_aggregation& agg) except + + rolling_aggregation& agg) except +libcudf_exception_handler cdef unique_ptr[column] rolling_window( column_view source, size_type preceding_window, size_type following_window, size_type min_periods, - rolling_aggregation& agg) except + + rolling_aggregation& agg) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/round.pxd b/python/pylibcudf/pylibcudf/libcudf/round.pxd index 1b65133f275..efd9e3de25d 100644 --- a/python/pylibcudf/pylibcudf/libcudf/round.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/round.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -16,4 +16,4 @@ cdef extern from "cudf/round.hpp" namespace "cudf" nogil: const column_view& input, int32_t decimal_places, rounding_method method, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd index a51413669c5..2c67dc325af 100644 --- a/python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t, int64_t from libcpp cimport bool from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.fixed_point.fixed_point cimport scale_type from pylibcudf.libcudf.table.table_view cimport table_view @@ -11,64 +11,66 @@ from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/scalar/scalar.hpp" namespace "cudf" nogil: cdef cppclass scalar: - scalar() except + - scalar(scalar other) except + - data_type type() except + - void set_valid_async(bool is_valid) except + - bool is_valid() except + + scalar() except +libcudf_exception_handler + scalar(scalar other) except +libcudf_exception_handler + data_type type() except +libcudf_exception_handler + void set_valid_async(bool is_valid) except +libcudf_exception_handler + bool is_valid() except +libcudf_exception_handler cdef cppclass numeric_scalar[T](scalar): - numeric_scalar() except + - numeric_scalar(numeric_scalar other) except + - numeric_scalar(T value) except + - numeric_scalar(T value, bool is_valid) except + - void set_value(T value) except + - T value() except + + numeric_scalar() except +libcudf_exception_handler + numeric_scalar(numeric_scalar other) except +libcudf_exception_handler + numeric_scalar(T value) except +libcudf_exception_handler + numeric_scalar(T value, bool is_valid) except +libcudf_exception_handler + void set_value(T value) except +libcudf_exception_handler + T value() except +libcudf_exception_handler cdef cppclass timestamp_scalar[T](scalar): - timestamp_scalar() except + - timestamp_scalar(timestamp_scalar other) except + - timestamp_scalar(int64_t value) except + - timestamp_scalar(int64_t value, bool is_valid) except + - timestamp_scalar(int32_t value) except + - timestamp_scalar(int32_t value, bool is_valid) except + - int64_t ticks_since_epoch_64 "ticks_since_epoch"() except + - int32_t ticks_since_epoch_32 "ticks_since_epoch"() except + - T value() except + + timestamp_scalar() except +libcudf_exception_handler + timestamp_scalar(timestamp_scalar other) except +libcudf_exception_handler + timestamp_scalar(int64_t value) except +libcudf_exception_handler + timestamp_scalar(int64_t value, bool is_valid) except +libcudf_exception_handler + timestamp_scalar(int32_t value) except +libcudf_exception_handler + timestamp_scalar(int32_t value, bool is_valid) except +libcudf_exception_handler + int64_t ticks_since_epoch_64 "ticks_since_epoch"()\ + except +libcudf_exception_handler + int32_t ticks_since_epoch_32 "ticks_since_epoch"()\ + except +libcudf_exception_handler + T value() except +libcudf_exception_handler cdef cppclass duration_scalar[T](scalar): - duration_scalar() except + - duration_scalar(duration_scalar other) except + - duration_scalar(int64_t value) except + - duration_scalar(int64_t value, bool is_valid) except + - duration_scalar(int32_t value) except + - duration_scalar(int32_t value, bool is_valid) except + - int64_t ticks "count"() except + - T value() except + + duration_scalar() except +libcudf_exception_handler + duration_scalar(duration_scalar other) except +libcudf_exception_handler + duration_scalar(int64_t value) except +libcudf_exception_handler + duration_scalar(int64_t value, bool is_valid) except +libcudf_exception_handler + duration_scalar(int32_t value) except +libcudf_exception_handler + duration_scalar(int32_t value, bool is_valid) except +libcudf_exception_handler + int64_t ticks "count"() except +libcudf_exception_handler + T value() except +libcudf_exception_handler cdef cppclass string_scalar(scalar): - string_scalar() except + - string_scalar(string st) except + - string_scalar(string st, bool is_valid) except + - string_scalar(string_scalar other) except + - string to_string() except + + string_scalar() except +libcudf_exception_handler + string_scalar(string st) except +libcudf_exception_handler + string_scalar(string st, bool is_valid) except +libcudf_exception_handler + string_scalar(string_scalar other) except +libcudf_exception_handler + string to_string() except +libcudf_exception_handler cdef cppclass fixed_point_scalar[T](scalar): - fixed_point_scalar() except + + fixed_point_scalar() except +libcudf_exception_handler fixed_point_scalar(int64_t value, scale_type scale, - bool is_valid) except + + bool is_valid) except +libcudf_exception_handler fixed_point_scalar(data_type value, scale_type scale, - bool is_valid) except + - int64_t value() except + + bool is_valid) except +libcudf_exception_handler + int64_t value() except +libcudf_exception_handler # TODO: Figure out how to add an int32 overload of value() cdef cppclass list_scalar(scalar): - list_scalar(column_view col) except + - list_scalar(column_view col, bool is_valid) except + - column_view view() except + + list_scalar(column_view col) except +libcudf_exception_handler + list_scalar(column_view col, bool is_valid) except +libcudf_exception_handler + column_view view() except +libcudf_exception_handler cdef cppclass struct_scalar(scalar): - struct_scalar(table_view cols, bool valid) except + - table_view view() except + + struct_scalar(table_view cols, bool valid) except +libcudf_exception_handler + table_view view() except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd index ee4b47935b2..9fb907970de 100644 --- a/python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd @@ -1,13 +1,19 @@ # Copyright (c) 2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/scalar/scalar_factories.hpp" namespace "cudf" nogil: - cdef unique_ptr[scalar] make_string_scalar(const string & _string) except + - cdef unique_ptr[scalar] make_fixed_width_scalar[T](T value) except + + cdef unique_ptr[scalar] make_string_scalar( + const string & _string + ) except +libcudf_exception_handler + cdef unique_ptr[scalar] make_fixed_width_scalar[T]( + T value + ) except +libcudf_exception_handler - cdef unique_ptr[scalar] make_empty_scalar_like(const column_view &) except + + cdef unique_ptr[scalar] make_empty_scalar_like( + const column_view & + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/search.pxd b/python/pylibcudf/pylibcudf/libcudf/search.pxd index 5a6ad5384c9..5ec06858baa 100644 --- a/python/pylibcudf/pylibcudf/libcudf/search.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/search.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.types as libcudf_types from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table_view cimport table_view @@ -15,16 +15,16 @@ cdef extern from "cudf/search.hpp" namespace "cudf" nogil: table_view needles, vector[libcudf_types.order] column_order, vector[libcudf_types.null_order] null_precedence, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] upper_bound( table_view haystack, table_view needles, vector[libcudf_types.order] column_order, vector[libcudf_types.null_order] null_precedence, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] contains( column_view haystack, column_view needles, - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/sorting.pxd b/python/pylibcudf/pylibcudf/libcudf/sorting.pxd index 9e899855486..342545a0eec 100644 --- a/python/pylibcudf/pylibcudf/libcudf/sorting.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/sorting.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - cimport pylibcudf.libcudf.types as libcudf_types from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.aggregation cimport rank_method from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -15,12 +15,14 @@ cdef extern from "cudf/sorting.hpp" namespace "cudf" nogil: cdef unique_ptr[column] sorted_order( table_view source_table, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[column] stable_sorted_order( table_view source_table, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[column] rank( column_view input_view, @@ -28,45 +30,52 @@ cdef extern from "cudf/sorting.hpp" namespace "cudf" nogil: libcudf_types.order column_order, libcudf_types.null_policy null_handling, libcudf_types.null_order null_precedence, - bool percentage) except + + bool percentage) except +libcudf_exception_handler cdef bool is_sorted( const table_view& table, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[table] segmented_sort_by_key( const table_view& values, const table_view& keys, const column_view& segment_offsets, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[table] stable_segmented_sort_by_key( const table_view& values, const table_view& keys, const column_view& segment_offsets, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[table] sort_by_key( const table_view& values, const table_view& keys, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[table] stable_sort_by_key( const table_view& values, const table_view& keys, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[table] sort( table_view source_table, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler cdef unique_ptr[table] stable_sort( table_view source_table, vector[libcudf_types.order] column_order, - vector[libcudf_types.null_order] null_precedence) except + + vector[libcudf_types.null_order] null_precedence + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd b/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd index 7830c9478c2..78b9bcb299b 100644 --- a/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.table.table cimport table @@ -23,25 +23,29 @@ cdef extern from "cudf/stream_compaction.hpp" namespace "cudf" nogil: KEEP_LAST KEEP_NONE - cdef unique_ptr[table] drop_nulls(table_view source_table, - vector[size_type] keys, - size_type keep_threshold) except + + cdef unique_ptr[table] drop_nulls( + table_view source_table, + vector[size_type] keys, + size_type keep_threshold + ) except +libcudf_exception_handler - cdef unique_ptr[table] drop_nans(table_view source_table, - vector[size_type] keys, - size_type keep_threshold) except + + cdef unique_ptr[table] drop_nans( + table_view source_table, + vector[size_type] keys, + size_type keep_threshold + ) except +libcudf_exception_handler cdef unique_ptr[table] apply_boolean_mask( table_view source_table, column_view boolean_mask - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] unique( table_view input, vector[size_type] keys, duplicate_keep_option keep, null_equality nulls_equal, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] distinct( table_view input, @@ -49,14 +53,14 @@ cdef extern from "cudf/stream_compaction.hpp" namespace "cudf" nogil: duplicate_keep_option keep, null_equality nulls_equal, nan_equality nans_equals, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] distinct_indices( table_view input, duplicate_keep_option keep, null_equality nulls_equal, nan_equality nans_equal, - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[table] stable_distinct( table_view input, @@ -64,22 +68,22 @@ cdef extern from "cudf/stream_compaction.hpp" namespace "cudf" nogil: duplicate_keep_option keep, null_equality nulls_equal, nan_equality nans_equal, - ) except + + ) except +libcudf_exception_handler cdef size_type unique_count( column_view column, null_policy null_handling, - nan_policy nan_handling) except + + nan_policy nan_handling) except +libcudf_exception_handler cdef size_type unique_count( table_view source_table, - null_policy null_handling) except + + null_policy null_handling) except +libcudf_exception_handler cdef size_type distinct_count( column_view column, null_policy null_handling, - nan_policy nan_handling) except + + nan_policy nan_handling) except +libcudf_exception_handler cdef size_type distinct_count( table_view source_table, - null_policy null_handling) except + + null_policy null_handling) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd index 5e510339834..1cf3c912f95 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -8,10 +8,10 @@ from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/attributes.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] count_characters( - column_view source_strings) except + + column_view source_strings) except +libcudf_exception_handler cdef unique_ptr[column] count_bytes( - column_view source_strings) except + + column_view source_strings) except +libcudf_exception_handler cdef unique_ptr[column] code_points( - column_view source_strings) except + + column_view source_strings) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd index 77e3f46d7ee..a3815757d2d 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd @@ -1,5 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -10,12 +11,12 @@ cdef extern from "cudf/strings/capitalize.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] capitalize( const column_view & strings, const string_scalar & delimiters - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] title( const column_view & strings, string_character_types sequence_type - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] is_title( - const column_view & strings) except + + const column_view & strings) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/case.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/case.pxd index 7869e90f387..7e60476b87b 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/case.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/case.pxd @@ -1,21 +1,22 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/case.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] capitalize( - const column_view & input) except + + const column_view & input) except +libcudf_exception_handler cdef unique_ptr[column] is_title( - const column_view & input) except + + const column_view & input) except +libcudf_exception_handler cdef unique_ptr[column] to_lower( - const column_view & strings) except + + const column_view & strings) except +libcudf_exception_handler cdef unique_ptr[column] to_upper( - const column_view & strings) except + + const column_view & strings) except +libcudf_exception_handler cdef unique_ptr[column] swapcase( - const column_view & strings) except + + const column_view & strings) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd index 76afe047e8c..6a0ae06c08a 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint32_t from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -25,10 +25,10 @@ cdef extern from "cudf/strings/char_types/char_types.hpp" \ cdef unique_ptr[column] all_characters_of_type( column_view source_strings, string_character_types types, - string_character_types verify_types) except + + string_character_types verify_types) except +libcudf_exception_handler cdef unique_ptr[column] filter_characters_of_type( column_view source_strings, string_character_types types_to_remove, string_scalar replacement, - string_character_types types_to_keep) except + + string_character_types types_to_keep) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd index e659993b834..90be281429b 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd @@ -2,6 +2,7 @@ from libcpp cimport int from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -22,19 +23,19 @@ cdef extern from "cudf/strings/combine.hpp" namespace "cudf::strings" nogil: table_view strings_columns, string_scalar separator, string_scalar narep, - separator_on_nulls separate_nulls) except + + separator_on_nulls separate_nulls) except +libcudf_exception_handler cdef unique_ptr[column] concatenate( table_view strings_columns, column_view separators, string_scalar separator_narep, string_scalar col_narep, - separator_on_nulls separate_nulls) except + + separator_on_nulls separate_nulls) except +libcudf_exception_handler cdef unique_ptr[column] join_strings( column_view input, string_scalar separator, - string_scalar narep) except + + string_scalar narep) except +libcudf_exception_handler cdef unique_ptr[column] join_list_elements( column_view lists_strings_column, @@ -42,11 +43,11 @@ cdef extern from "cudf/strings/combine.hpp" namespace "cudf::strings" nogil: string_scalar separator_narep, string_scalar string_narep, separator_on_nulls separate_nulls, - output_if_empty_list empty_list_policy) except + + output_if_empty_list empty_list_policy) except +libcudf_exception_handler cdef unique_ptr[column] join_list_elements( column_view lists_strings_column, string_scalar separator, string_scalar narep, separator_on_nulls separate_nulls, - output_if_empty_list empty_list_policy) except + + output_if_empty_list empty_list_policy) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd index eac0f748257..8eb287c6b06 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -11,22 +11,22 @@ cdef extern from "cudf/strings/contains.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] contains_re( column_view source_strings, - regex_program) except + + regex_program) except +libcudf_exception_handler cdef unique_ptr[column] count_re( column_view source_strings, - regex_program) except + + regex_program) except +libcudf_exception_handler cdef unique_ptr[column] matches_re( column_view source_strings, - regex_program) except + + regex_program) except +libcudf_exception_handler cdef unique_ptr[column] like( column_view source_strings, string_scalar pattern, - string_scalar escape_character) except + + string_scalar escape_character) except +libcudf_exception_handler cdef unique_ptr[column] like( column_view source_strings, column_view patterns, - string_scalar escape_character) except + + string_scalar escape_character) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd index e6688cfff81..37f39b098b3 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd @@ -1,5 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -9,9 +10,9 @@ cdef extern from "cudf/strings/convert/convert_booleans.hpp" namespace \ "cudf::strings" nogil: cdef unique_ptr[column] to_booleans( column_view input, - string_scalar true_string) except + + string_scalar true_string) except +libcudf_exception_handler cdef unique_ptr[column] from_booleans( column_view booleans, string_scalar true_string, - string_scalar false_string) except + + string_scalar false_string) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd index fceddd58df0..c316b7891a3 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport data_type @@ -12,13 +12,13 @@ cdef extern from "cudf/strings/convert/convert_datetime.hpp" namespace \ cdef unique_ptr[column] to_timestamps( column_view input, data_type timestamp_type, - string format) except + + string format) except +libcudf_exception_handler cdef unique_ptr[column] from_timestamps( column_view timestamps, string format, - column_view names) except + + column_view names) except +libcudf_exception_handler cdef unique_ptr[column] is_timestamp( column_view input_col, - string format) except + + string format) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd index 43ffad1d89f..75374208172 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport data_type @@ -12,8 +12,8 @@ cdef extern from "cudf/strings/convert/convert_durations.hpp" namespace \ cdef unique_ptr[column] to_durations( const column_view & input, data_type duration_type, - const string & format) except + + const string & format) except +libcudf_exception_handler cdef unique_ptr[column] from_durations( const column_view & durations, - const string & format) except + + const string & format) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd index 72ab329f2dd..71c866ad211 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport data_type @@ -10,12 +10,12 @@ cdef extern from "cudf/strings/convert/convert_fixed_point.hpp" namespace \ "cudf::strings" nogil: cdef unique_ptr[column] to_fixed_point( column_view input, - data_type output_type) except + + data_type output_type) except +libcudf_exception_handler cdef unique_ptr[column] from_fixed_point( - column_view input) except + + column_view input) except +libcudf_exception_handler cdef unique_ptr[column] is_fixed_point( column_view input, data_type decimal_type - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd index a45c7f9979e..7df6b914458 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport data_type @@ -10,11 +10,11 @@ cdef extern from "cudf/strings/convert/convert_floats.hpp" namespace \ "cudf::strings" nogil: cdef unique_ptr[column] to_floats( column_view strings, - data_type output_type) except + + data_type output_type) except +libcudf_exception_handler cdef unique_ptr[column] from_floats( - column_view floats) except + + column_view floats) except +libcudf_exception_handler cdef unique_ptr[column] is_float( column_view input - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd index 69d566b8c49..4033ef51480 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd @@ -1,5 +1,4 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd index 801db438e92..33f9c798ae6 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -8,11 +8,11 @@ from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/convert/convert_ipv4.hpp" namespace \ "cudf::strings" nogil: cdef unique_ptr[column] ipv4_to_integers( - column_view input) except + + column_view input) except +libcudf_exception_handler cdef unique_ptr[column] integers_to_ipv4( - column_view integers) except + + column_view integers) except +libcudf_exception_handler cdef unique_ptr[column] is_ipv4( column_view input - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd index 6e1ecd30539..3d0a677424e 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd @@ -1,5 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -11,4 +12,4 @@ cdef extern from "cudf/strings/convert/convert_lists.hpp" namespace \ cdef unique_ptr[column] format_list_column( column_view input, string_scalar na_rep, - column_view separators) except + + column_view separators) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd index cb319ad143b..03a14e215e0 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -8,7 +8,7 @@ from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/convert/convert_urls.hpp" namespace \ "cudf::strings" nogil: cdef unique_ptr[column] url_encode( - column_view input) except + + column_view input) except +libcudf_exception_handler cdef unique_ptr[column] url_decode( - column_view input) except + + column_view input) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd index b7166167cfd..18608554921 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.strings.regex_program cimport regex_program @@ -11,8 +11,8 @@ cdef extern from "cudf/strings/extract.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[table] extract( column_view input, - regex_program prog) except + + regex_program prog) except +libcudf_exception_handler cdef unique_ptr[column] extract_all_record( column_view input, - regex_program prog) except + + regex_program prog) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/find.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/find.pxd index 1d1df1b8b8e..4082145c5b8 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/find.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/find.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -12,41 +12,41 @@ cdef extern from "cudf/strings/find.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] contains( column_view source_strings, - string_scalar target) except + + string_scalar target) except +libcudf_exception_handler cdef unique_ptr[column] contains( column_view source_strings, - column_view target_strings) except + + column_view target_strings) except +libcudf_exception_handler cdef unique_ptr[column] ends_with( column_view source_strings, - string_scalar target) except + + string_scalar target) except +libcudf_exception_handler cdef unique_ptr[column] ends_with( column_view source_strings, - column_view target_strings) except + + column_view target_strings) except +libcudf_exception_handler cdef unique_ptr[column] starts_with( column_view source_strings, - string_scalar target) except + + string_scalar target) except +libcudf_exception_handler cdef unique_ptr[column] starts_with( column_view source_strings, - column_view target_strings) except + + column_view target_strings) except +libcudf_exception_handler cdef unique_ptr[column] find( column_view source_strings, string_scalar target, size_type start, - size_type stop) except + + size_type stop) except +libcudf_exception_handler cdef unique_ptr[column] find( column_view source_strings, column_view target, - size_type start) except + + size_type start) except +libcudf_exception_handler cdef unique_ptr[column] rfind( column_view source_strings, string_scalar target, size_type start, - size_type stop) except + + size_type stop) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd index 3d048c1f50b..b03044db4f4 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view @@ -10,4 +10,4 @@ cdef extern from "cudf/strings/find_multiple.hpp" namespace "cudf::strings" \ cdef unique_ptr[column] find_multiple( column_view input, - column_view targets) except + + column_view targets) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd index 0d286c36446..eda68c35e58 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2019-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.strings.regex_program cimport regex_program @@ -10,8 +10,8 @@ cdef extern from "cudf/strings/findall.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] findall( column_view input, - regex_program prog) except + + regex_program prog) except +libcudf_exception_handler cdef unique_ptr[column] find_re( column_view input, - regex_program prog) except + + regex_program prog) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd index 875f8cafd14..d82f76f98b6 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd @@ -2,6 +2,7 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -15,8 +16,8 @@ cdef extern from "cudf/strings/padding.hpp" namespace "cudf::strings" nogil: column_view input, size_type width, side_type side, - string fill_char) except + + string fill_char) except +libcudf_exception_handler cdef unique_ptr[column] zfill( column_view input, - size_type width) except + + size_type width) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pxd index 41617f157b7..1aa22107183 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/strings/regex/flags.hpp" \ diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd index 5d1d9e583d5..21f52f3de24 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.strings.regex_flags cimport regex_flags @@ -14,4 +14,4 @@ cdef extern from "cudf/strings/regex/regex_program.hpp" \ unique_ptr[regex_program] create( string pattern, regex_flags flags - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd index 59262820411..de65b554eba 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport size_type @@ -11,8 +11,8 @@ cdef extern from "cudf/strings/repeat_strings.hpp" namespace "cudf::strings" \ cdef unique_ptr[column] repeat_strings( column_view input, - size_type repeat_times) except + + size_type repeat_times) except +libcudf_exception_handler cdef unique_ptr[column] repeat_strings( column_view input, - column_view repeat_times) except + + column_view repeat_times) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd index fd5f4fc4751..68743d85712 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -14,15 +14,15 @@ cdef extern from "cudf/strings/replace.hpp" namespace "cudf::strings" nogil: column_view source_strings, string_scalar repl, size_type start, - size_type stop) except + + size_type stop) except +libcudf_exception_handler cdef unique_ptr[column] replace( column_view source_strings, string_scalar target, string_scalar repl, - int32_t maxrepl) except + + int32_t maxrepl) except +libcudf_exception_handler cdef unique_ptr[column] replace_multiple( column_view source_strings, column_view target_strings, - column_view repl_strings) except + + column_view repl_strings) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd index 6b0c90d0acc..2a7d50346be 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -18,15 +18,15 @@ cdef extern from "cudf/strings/replace_re.hpp" namespace "cudf::strings" nogil: column_view input, regex_program prog, string_scalar replacement, - size_type max_replace_count) except + + size_type max_replace_count) except +libcudf_exception_handler cdef unique_ptr[column] replace_re( column_view input, vector[string] patterns, column_view replacements, - regex_flags flags) except + + regex_flags flags) except +libcudf_exception_handler cdef unique_ptr[column] replace_with_backrefs( column_view input, regex_program prog, - string replacement) except + + string replacement) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/side_type.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/side_type.pxd index e92c5dc1d66..9626763d5af 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/side_type.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/side_type.pxd @@ -1,5 +1,6 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. from libcpp cimport int +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/strings/side_type.hpp" namespace "cudf::strings" nogil: diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd index 4299cf62e99..d1a2ddbaef4 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -13,8 +13,8 @@ cdef extern from "cudf/strings/split/partition.hpp" namespace \ cdef unique_ptr[table] partition( column_view input, - string_scalar delimiter) except + + string_scalar delimiter) except +libcudf_exception_handler cdef unique_ptr[table] rpartition( column_view input, - string_scalar delimiter) except + + string_scalar delimiter) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd index a22a79fc7d7..34fb72a3b33 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -16,22 +16,22 @@ cdef extern from "cudf/strings/split/split.hpp" namespace \ cdef unique_ptr[table] split( column_view strings_column, string_scalar delimiter, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef unique_ptr[table] rsplit( column_view strings_column, string_scalar delimiter, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef unique_ptr[column] split_record( column_view strings, string_scalar delimiter, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef unique_ptr[column] rsplit_record( column_view strings, string_scalar delimiter, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef extern from "cudf/strings/split/split_re.hpp" namespace \ @@ -40,19 +40,19 @@ cdef extern from "cudf/strings/split/split_re.hpp" namespace \ cdef unique_ptr[table] split_re( const column_view& input, regex_program prog, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef unique_ptr[table] rsplit_re( const column_view& input, regex_program prog, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef unique_ptr[column] split_record_re( const column_view& input, regex_program prog, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler cdef unique_ptr[column] rsplit_record_re( const column_view& input, regex_program prog, - size_type maxsplit) except + + size_type maxsplit) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd index dd527a78e7f..41751ddff3c 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -12,4 +12,4 @@ cdef extern from "cudf/strings/strip.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] strip( column_view input, side_type side, - string_scalar to_strip) except + + string_scalar to_strip) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd index 576dae9387f..f573870583d 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport numeric_scalar @@ -12,9 +12,9 @@ cdef extern from "cudf/strings/slice.hpp" namespace "cudf::strings" nogil: column_view source_strings, numeric_scalar[size_type] start, numeric_scalar[size_type] end, - numeric_scalar[size_type] step) except + + numeric_scalar[size_type] step) except +libcudf_exception_handler cdef unique_ptr[column] slice_strings( column_view source_strings, column_view starts, - column_view stops) except + + column_view stops) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd index 9fd24f2987b..11b63d0ed30 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.scalar.scalar cimport string_scalar @@ -14,7 +14,8 @@ cdef extern from "cudf/strings/translate.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] translate( column_view input, - vector[pair[char_utf8, char_utf8]] chars_table) except + + vector[pair[char_utf8, char_utf8]] chars_table + ) except +libcudf_exception_handler cpdef enum class filter_type(bool): KEEP @@ -24,4 +25,4 @@ cdef extern from "cudf/strings/translate.hpp" namespace "cudf::strings" nogil: column_view input, vector[pair[char_utf8, char_utf8]] characters_to_filter, filter_type keep_characters, - string_scalar replacement) except + + string_scalar replacement) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd index abc1bd43ad2..2fb49c2a830 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport size_type @@ -10,4 +10,4 @@ cdef extern from "cudf/strings/wrap.hpp" namespace "cudf::strings" nogil: cdef unique_ptr[column] wrap( column_view input, - size_type width) except + + size_type width) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd b/python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd index 2eca043e451..a2654eaab16 100644 --- a/python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2022-2024, NVIDIA CORPORATION. - from libc.stdint cimport uint8_t, uint16_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport size_type @@ -17,17 +17,19 @@ cdef extern from "cudf/strings/udf/udf_string.hpp" namespace \ cdef extern from "cudf/strings/udf/udf_apis.hpp" namespace \ "cudf::strings::udf" nogil: - cdef int get_cuda_build_version() except + - cdef unique_ptr[device_buffer] to_string_view_array(column_view) except + + cdef int get_cuda_build_version() except +libcudf_exception_handler + cdef unique_ptr[device_buffer] to_string_view_array( + column_view + ) except +libcudf_exception_handler cdef unique_ptr[column] column_from_udf_string_array( udf_string* strings, size_type size, - ) except + + ) except +libcudf_exception_handler cdef void free_udf_string_array( udf_string* strings, size_type size - ) except + + ) except +libcudf_exception_handler cdef extern from "cudf/strings/detail/char_tables.hpp" namespace \ "cudf::strings::detail" nogil: - cdef const uint8_t* get_character_flags_table() except + - cdef const uint16_t* get_character_cases_table() except + - cdef const void* get_special_case_mapping_table() except + + cdef const uint8_t* get_character_flags_table() except +libcudf_exception_handler + cdef const uint16_t* get_character_cases_table() except +libcudf_exception_handler + cdef const void* get_special_case_mapping_table() except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/table/table.pxd b/python/pylibcudf/pylibcudf/libcudf/table/table.pxd index 654c29b083a..b65644dd131 100644 --- a/python/pylibcudf/pylibcudf/libcudf/table/table.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/table/table.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.table.table_view cimport mutable_table_view, table_view from pylibcudf.libcudf.types cimport size_type @@ -9,10 +9,10 @@ from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/table/table.hpp" namespace "cudf" nogil: cdef cppclass table: - table(const table&) except + - table(table_view) except + - size_type num_columns() except + - size_type num_rows() except + - table_view view() except + - mutable_table_view mutable_view() except + - vector[unique_ptr[column]] release() except + + table(const table&) except +libcudf_exception_handler + table(table_view) except +libcudf_exception_handler + size_type num_columns() except +libcudf_exception_handler + size_type num_rows() except +libcudf_exception_handler + table_view view() except +libcudf_exception_handler + mutable_table_view mutable_view() except +libcudf_exception_handler + vector[unique_ptr[column]] release() except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd b/python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd index 3af2f6a6c2c..eacfa0420ef 100644 --- a/python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, @@ -10,16 +10,22 @@ from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/table/table_view.hpp" namespace "cudf" nogil: cdef cppclass table_view: - table_view() except + - table_view(const vector[column_view]) except + - column_view column(size_type column_index) except + - size_type num_columns() except + - size_type num_rows() except + - table_view select(vector[size_type] column_indices) except + + table_view() except +libcudf_exception_handler + table_view(const vector[column_view]) except +libcudf_exception_handler + column_view column(size_type column_index) except +libcudf_exception_handler + size_type num_columns() except +libcudf_exception_handler + size_type num_rows() except +libcudf_exception_handler + table_view select( + vector[size_type] column_indices + ) except +libcudf_exception_handler cdef cppclass mutable_table_view: - mutable_table_view() except + - mutable_table_view(const vector[mutable_column_view]) except + - mutable_column_view column(size_type column_index) except + - size_type num_columns() except + - size_type num_rows() except + + mutable_table_view() except +libcudf_exception_handler + mutable_table_view( + const vector[mutable_column_view] + ) except +libcudf_exception_handler + mutable_column_view column( + size_type column_index + ) except +libcudf_exception_handler + size_type num_columns() except +libcudf_exception_handler + size_type num_rows() except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/transform.pxd b/python/pylibcudf/pylibcudf/libcudf/transform.pxd index 47d79083b66..78ee7b4b0e5 100644 --- a/python/pylibcudf/pylibcudf/libcudf/transform.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/transform.pxd @@ -1,9 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.string cimport string +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.expressions cimport expression @@ -17,38 +17,38 @@ from rmm.librmm.device_buffer cimport device_buffer cdef extern from "cudf/transform.hpp" namespace "cudf" nogil: cdef pair[unique_ptr[device_buffer], size_type] bools_to_mask ( column_view input - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] mask_to_bools ( bitmask_type* bitmask, size_type begin_bit, size_type end_bit - ) except + + ) except +libcudf_exception_handler cdef pair[unique_ptr[device_buffer], size_type] nans_to_nulls( column_view input - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] compute_column( table_view table, expression expr - ) except + + ) except +libcudf_exception_handler cdef unique_ptr[column] transform( column_view input, string unary_udf, data_type output_type, bool is_ptx - ) except + + ) except +libcudf_exception_handler cdef pair[unique_ptr[table], unique_ptr[column]] encode( table_view input - ) except + + ) except +libcudf_exception_handler cdef pair[unique_ptr[column], table_view] one_hot_encode( column_view input_column, column_view categories - ) + ) except + cdef unique_ptr[column] compute_column( const table_view table, const expression& expr - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/transpose.pxd b/python/pylibcudf/pylibcudf/libcudf/transpose.pxd index 9c0e3c073b0..fde49afd99c 100644 --- a/python/pylibcudf/pylibcudf/libcudf/transpose.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/transpose.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.table.table_view cimport table_view @@ -12,4 +12,4 @@ cdef extern from "cudf/transpose.hpp" namespace "cudf" nogil: table_view ] transpose( table_view input_table - ) except + + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/types.pxd b/python/pylibcudf/pylibcudf/libcudf/types.pxd index 60e293e5cdb..3281c230aa0 100644 --- a/python/pylibcudf/pylibcudf/libcudf/types.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/types.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t, uint32_t from libcpp cimport bool +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/types.hpp" namespace "cudf" nogil: @@ -85,10 +85,10 @@ cdef extern from "cudf/types.hpp" namespace "cudf" nogil: NUM_TYPE_IDS cdef cppclass data_type: - data_type() except + - data_type(const data_type&) except + - data_type(type_id id) except + - data_type(type_id id, int32_t scale) except + + data_type() except +libcudf_exception_handler + data_type(const data_type&) except +libcudf_exception_handler + data_type(type_id id) except +libcudf_exception_handler + data_type(type_id id, int32_t scale) except +libcudf_exception_handler type_id id() noexcept int32_t scale() noexcept bool operator==(const data_type&, const data_type&) noexcept @@ -100,4 +100,4 @@ cdef extern from "cudf/types.hpp" namespace "cudf" nogil: MIDPOINT NEAREST - cdef size_type size_of(data_type t) except + + cdef size_type size_of(data_type t) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/unary.pxd b/python/pylibcudf/pylibcudf/libcudf/unary.pxd index 887f8c7fca4..4666012623e 100644 --- a/python/pylibcudf/pylibcudf/libcudf/unary.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/unary.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. - from libc.stdint cimport int32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.column.column cimport column from pylibcudf.libcudf.column.column_view cimport column_view from pylibcudf.libcudf.types cimport data_type @@ -36,13 +36,21 @@ cdef extern from "cudf/unary.hpp" namespace "cudf" nogil: cdef extern unique_ptr[column] unary_operation( column_view input, - unary_operator op) except + + unary_operator op) except +libcudf_exception_handler - cdef extern unique_ptr[column] is_null(column_view input) except + - cdef extern unique_ptr[column] is_valid(column_view input) except + + cdef extern unique_ptr[column] is_null( + column_view input + ) except +libcudf_exception_handler + cdef extern unique_ptr[column] is_valid( + column_view input + ) except +libcudf_exception_handler cdef extern unique_ptr[column] cast( column_view input, - data_type out_type) except + + data_type out_type) except +libcudf_exception_handler cdef extern bool is_supported_cast(data_type from_, data_type to) noexcept - cdef extern unique_ptr[column] is_nan(column_view input) except + - cdef extern unique_ptr[column] is_not_nan(column_view input) except + + cdef extern unique_ptr[column] is_nan( + column_view input + ) except +libcudf_exception_handler + cdef extern unique_ptr[column] is_not_nan( + column_view input + ) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/utilities/span.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/span.pxd index 7e591e96373..8024ce146ae 100644 --- a/python/pylibcudf/pylibcudf/libcudf/utilities/span.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/utilities/span.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. - +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler cdef extern from "cudf/utilities/span.hpp" namespace "cudf" nogil: cdef cppclass host_span[T]: - host_span() except + - host_span(vector[T]) except + + host_span() except +libcudf_exception_handler + host_span(vector[T]) except +libcudf_exception_handler diff --git a/python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd index 5533530754e..93f13a7e11f 100644 --- a/python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. - from libcpp cimport bool from libcpp.vector cimport vector +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport data_type diff --git a/python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd index fbeb6e9db90..c3e3232b5cc 100644 --- a/python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd @@ -1,5 +1,5 @@ # Copyright (c) 2024, NVIDIA CORPORATION. - +from pylibcudf.exception_handler cimport libcudf_exception_handler from pylibcudf.libcudf.types cimport type_id diff --git a/python/pylibcudf/pylibcudf/tests/test_column_factories.py b/python/pylibcudf/pylibcudf/tests/test_column_factories.py index e317362a76b..e1c8a8303ec 100644 --- a/python/pylibcudf/pylibcudf/tests/test_column_factories.py +++ b/python/pylibcudf/pylibcudf/tests/test_column_factories.py @@ -105,7 +105,7 @@ def test_make_empty_column_dtype(pa_type): plc_type = plc.interop.from_arrow(pa_col).type() if isinstance(pa_type, (pa.ListType, pa.StructType)): - with pytest.raises(ValueError): + with pytest.raises(TypeError): plc.column_factories.make_empty_column(plc_type) return @@ -119,7 +119,7 @@ def test_make_empty_column_typeid(pa_type): tid = plc.interop.from_arrow(pa_col).type().id() if isinstance(pa_type, (pa.ListType, pa.StructType)): - with pytest.raises(ValueError): + with pytest.raises(TypeError): plc.column_factories.make_empty_column(tid) return @@ -154,7 +154,7 @@ def test_make_numeric_column(numeric_pa_type, mask_state): ) def test_make_numeric_column_dtype_err(non_numeric_pa_type): plc_type = plc.interop.from_arrow(non_numeric_pa_type) - with pytest.raises(ValueError): + with pytest.raises(TypeError): plc.column_factories.make_numeric_column( plc_type, 3, plc.types.MaskState.UNALLOCATED ) @@ -183,7 +183,7 @@ def test_make_fixed_point_column(fixed_point_pa_type, mask_state): ) def test_make_fixed_point_column_dtype_err(non_fixed_point_pa_type): plc_type = plc.interop.from_arrow(non_fixed_point_pa_type) - with pytest.raises(ValueError): + with pytest.raises(TypeError): plc.column_factories.make_fixed_point_column( plc_type, 3, plc.types.MaskState.UNALLOCATED ) @@ -211,7 +211,7 @@ def test_make_timestamp_column(timestamp_pa_type, mask_state): ) def test_make_timestamp_column_dtype_err(non_timestamp_pa_type): plc_type = plc.interop.from_arrow(non_timestamp_pa_type) - with pytest.raises(ValueError): + with pytest.raises(TypeError): plc.column_factories.make_timestamp_column( plc_type, 3, plc.types.MaskState.UNALLOCATED ) @@ -239,7 +239,7 @@ def test_make_duration_column(duration_pa_type, mask_state): ) def test_make_duration_column_dtype_err(non_duration_pa_type): plc_type = plc.interop.from_arrow(non_duration_pa_type) - with pytest.raises(ValueError): + with pytest.raises(TypeError): plc.column_factories.make_duration_column( plc_type, 3, plc.types.MaskState.UNALLOCATED )