pitrou commented on a change in pull request #10862:
URL: https://github.com/apache/arrow/pull/10862#discussion_r682723742
##########
File path: cpp/src/arrow/scalar_test.cc
##########
@@ -37,14 +37,52 @@ namespace arrow {
using internal::checked_cast;
using internal::checked_pointer_cast;
+std::shared_ptr<Scalar> CheckMakeNullScalar(const std::shared_ptr<DataType>&
type) {
+ const auto scalar = MakeNullScalar(type);
+ ARROW_EXPECT_OK(scalar->Validate());
+ ARROW_EXPECT_OK(scalar->ValidateFull());
+ AssertTypeEqual(*type, *scalar->type);
+ EXPECT_FALSE(scalar->is_valid);
+ return scalar;
+}
+
+template <typename... MakeScalarArgs>
+void AssertMakeScalar(const Scalar& expected, MakeScalarArgs&&... args) {
+ ASSERT_OK_AND_ASSIGN(auto scalar,
MakeScalar(std::forward<MakeScalarArgs>(args)...));
+ ASSERT_OK(scalar->Validate());
+ ASSERT_OK(scalar->ValidateFull());
+ AssertScalarsEqual(expected, *scalar, /*verbose=*/true);
+}
+
+void AssertParseScalar(const std::shared_ptr<DataType>& type, const
util::string_view& s,
Review comment:
I have no idea. Can you open a JIRA for that?
--
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]