pitrou commented on code in PR #35794:
URL: https://github.com/apache/arrow/pull/35794#discussion_r1210613034
##########
cpp/src/arrow/datum.h:
##########
@@ -64,69 +68,102 @@ struct ARROW_EXPORT Datum {
Datum(Datum&& other) = default;
Datum& operator=(Datum&& other) = default;
+ /// \brief Construct from a Scalar
Datum(std::shared_ptr<Scalar> value) // NOLINT implicit conversion
: value(std::move(value)) {}
+ /// \brief Construct from an ArrayData
Datum(std::shared_ptr<ArrayData> value) // NOLINT implicit conversion
: value(std::move(value)) {}
+ /// \brief Construct from an ArrayData
Datum(ArrayData arg) // NOLINT implicit conversion
: value(std::make_shared<ArrayData>(std::move(arg))) {}
- Datum(const Array& value); // NOLINT implicit conversion
+ /// \brief Construct from an Array
+ Datum(const Array& value); // NOLINT implicit conversion
+
+ /// \brief Construct from an Array
Datum(const std::shared_ptr<Array>& value); // NOLINT implicit conversion
+
+ /// \brief Construct from a ChunkedArray
Datum(std::shared_ptr<ChunkedArray> value); // NOLINT implicit conversion
- Datum(std::shared_ptr<RecordBatch> value); // NOLINT implicit conversion
- Datum(std::shared_ptr<Table> value); // NOLINT implicit conversion
- // Explicit constructors from const-refs. Can be expensive, prefer the
- // shared_ptr constructors
+ /// \brief Construct from a RecordBatch
+ Datum(std::shared_ptr<RecordBatch> value); // NOLINT implicit conversion
+
+ /// \brief Construct from a Table
+ Datum(std::shared_ptr<Table> value); // NOLINT implicit conversion
+
+ /// \brief Construct from a ChunkedArray. Can be expensive, prefer the
+ /// shared_ptr constructor
explicit Datum(const ChunkedArray& value);
+
+ /// \brief Construct from a RecordBatch. Can be expensive, prefer the
+ /// shared_ptr constructor
explicit Datum(const RecordBatch& value);
+
+ /// \brief Construct from a Table. Can be expensive, prefer the
+ /// shared_ptr constructor
explicit Datum(const Table& value);
- // Cast from subtypes of Array or Scalar to Datum
+ /// \brief Cast from concrete types of Array or Scalar to Datum
Review Comment:
"subtypes" rather than "types"?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]