This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new d2fd730c1e GH-36451: [CI][C++] Fix compilation failure on Fedora 35 
(#36457)
d2fd730c1e is described below

commit d2fd730c1e7e485a98d9520977d059f3b1c8c804
Author: Antoine Pitrou <[email protected]>
AuthorDate: Tue Jul 4 18:34:06 2023 +0200

    GH-36451: [CI][C++] Fix compilation failure on Fedora 35 (#36457)
    
    `testing::HasSubstr` might not accept a `std::string_view` argument.
    * Closes: #36451
    
    Authored-by: Antoine Pitrou <[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 cpp/src/arrow/scalar_test.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/cpp/src/arrow/scalar_test.cc b/cpp/src/arrow/scalar_test.cc
index b66857717f..a188aea166 100644
--- a/cpp/src/arrow/scalar_test.cc
+++ b/cpp/src/arrow/scalar_test.cc
@@ -1075,10 +1075,8 @@ void CheckListCast(const ScalarType& scalar, const 
std::shared_ptr<DataType>& to
                       *checked_cast<const 
BaseListScalar&>(*cast_scalar).value);
 }
 
-template <typename ScalarType>
-void CheckInvalidListCast(const ScalarType& scalar,
-                          const std::shared_ptr<DataType>& to_type,
-                          std::string_view expected_message) {
+void CheckInvalidListCast(const Scalar& scalar, const 
std::shared_ptr<DataType>& to_type,
+                          const std::string& expected_message) {
   EXPECT_RAISES_WITH_CODE_AND_MESSAGE_THAT(StatusCode::Invalid,
                                            
::testing::HasSubstr(expected_message),
                                            scalar.CastTo(to_type));

Reply via email to