lidavidm commented on a change in pull request #12608:
URL: https://github.com/apache/arrow/pull/12608#discussion_r824805659
##########
File path: cpp/src/arrow/scalar.h
##########
@@ -100,6 +100,8 @@ struct ARROW_EXPORT Scalar : public
util::EqualityComparable<Scalar> {
// TODO(bkietz) add compute::CastOptions
Result<std::shared_ptr<Scalar>> CastTo(std::shared_ptr<DataType> to) const;
+ ARROW_EXPORT friend void PrintTo(const Scalar& scalar, std::ostream* os);
Review comment:
nit, but we should `#include <iosfwd>` since we're using std::ostream
here
##########
File path: cpp/src/arrow/scalar.cc
##########
@@ -1025,4 +1025,6 @@ Result<std::shared_ptr<Scalar>>
Scalar::CastTo(std::shared_ptr<DataType> to) con
return out;
}
+void PrintTo(const Scalar& scalar, std::ostream* os) { *os <<
scalar.ToString(); }
Review comment:
and technically here we should `#include <ostream>`
--
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]