Skip to content

Commit

Permalink
Document all new throws.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Feb 7, 2023
1 parent fa1ad10 commit 586dd76
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
5 changes: 4 additions & 1 deletion cpp/include/cudf/binaryop.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -108,6 +108,7 @@ enum class binary_operator : int32_t {
* @throw cudf::logic_error if @p output_type dtype isn't fixed-width
* @throw cudf::logic_error if @p output_type dtype isn't boolean for comparison and logical
* operations.
* @throw cudf::dtype_error if the operation is not supported for the types of @p lhs and @p rhs
*/
std::unique_ptr<column> binary_operation(
scalar const& lhs,
Expand Down Expand Up @@ -136,6 +137,7 @@ std::unique_ptr<column> binary_operation(
* @throw cudf::logic_error if @p output_type dtype isn't fixed-width
* @throw cudf::logic_error if @p output_type dtype isn't boolean for comparison and logical
* operations.
* @throw cudf::dtype_error if the operation is not supported for the types of @p lhs and @p rhs
*/
std::unique_ptr<column> binary_operation(
column_view const& lhs,
Expand Down Expand Up @@ -163,6 +165,7 @@ std::unique_ptr<column> binary_operation(
* @throw cudf::logic_error if @p output_type dtype isn't boolean for comparison and logical
* operations.
* @throw cudf::logic_error if @p output_type dtype isn't fixed-width
* @throw cudf::dtype_error if the operation is not supported for the types of @p lhs and @p rhs
*/
std::unique_ptr<column> binary_operation(
column_view const& lhs,
Expand Down
10 changes: 5 additions & 5 deletions cpp/include/cudf/concatenate.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,8 +50,8 @@ rmm::device_buffer concatenate_masks(
/**
* @brief Concatenates multiple columns into a single column.
*
* @throws cudf::logic_error
* If types of the input columns mismatch
* @throws cudf::logic_error If types of the input columns mismatch
* @throws std::overflow_error If the the total number of output rows exceeds cudf::size_type
*
* @param columns_to_concat host_span of column views to be concatenated into a single column
* @param mr Device memory resource used to allocate the returned column's device memory
Expand Down Expand Up @@ -80,8 +80,8 @@ std::unique_ptr<column> concatenate(
* column_view tc1 = (t->view()).column(1); //Contains {0,1,2,3,4,5,6,7}
* ```
*
* @throws cudf::logic_error
* If number of columns mismatch
* @throws cudf::logic_error If number of columns mismatch
* @throws std::overflow_error If the the total number of output rows exceeds cudf::size_type
*
* @param tables_to_concat host_span of table views to be concatenated into a single table
* @param mr Device memory resource used to allocate the returned table's device memory
Expand Down
6 changes: 3 additions & 3 deletions cpp/include/cudf/lists/combine.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,8 +80,8 @@ std::unique_ptr<column> concatenate_rows(
* r is [ {1, 2, 3, 4, 5}, {6, 7, 8, 9} ]
* @endcode
*
* @throws cudf::logic_error if the input column is not at least two-level depth lists column (i.e.,
* each row must be a list of list).
* @throws std::invalid_argument if the input column is not at least two-level depth lists column
* (i.e., each row must be a list of list).
* @throws cudf::logic_error if the input lists column contains nested typed entries that are not
* lists.
*
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cudf/lists/contains.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -163,7 +163,7 @@ std::unique_ptr<column> index_of(
* @return std::unique_ptr<column> INT32 column of `n` rows with the location of the `search_key`
*
* @throw cudf::logic_error If `search_keys` does not match `lists` in its number of rows
* @throw cudf::logic_error If `search_keys` type does not match the element type in `lists`
* @throw cudf::dtype_error If `search_keys` type does not match the element type in `lists`
* @throw cudf::logic_error If `lists` or `search_keys` contains nested elements (LIST, STRUCT)
*/
std::unique_ptr<column> index_of(
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cudf/lists/gather.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ namespace lists {
* @endcode
*
* @throws cudf::logic_error if `gather_map_list` size is not same as `source_column` size.
* @throws cudf::logic_error if gather_map contains null values.
* @throws std::invalid_argument if gather_map contains null values.
* @throws cudf::logic_error if gather_map is not list column of an index type.
*
* If indices in `gather_map_list` are outside the range `[-n, n)`, where `n` is the number of
Expand Down
4 changes: 3 additions & 1 deletion cpp/include/cudf/strings/json.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -160,6 +160,8 @@ class get_json_object_options {
* @param options Options for controlling the behavior of the function
* @param mr Resource for allocating device memory.
* @return New strings column containing the retrieved json object strings
*
* @throw std::invalid_argument if provided an invalid operator or an empty name
*/
std::unique_ptr<cudf::column> get_json_object(
cudf::strings_column_view const& col,
Expand Down

0 comments on commit 586dd76

Please sign in to comment.