From 0af2a90fb78a899de7014114491f1233bbb005fe Mon Sep 17 00:00:00 2001
From: David Li
Date: Tue, 16 Aug 2022 20:03:22 -0400
Subject: [PATCH] ARROW-17420: [C++][FlightRPC] Fix schema validation in Flight
SQL integration test (#13897)
Authored-by: David Li
Signed-off-by: Sutou Kouhei
---
cpp/src/arrow/flight/integration_tests/test_integration.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cpp/src/arrow/flight/integration_tests/test_integration.cc b/cpp/src/arrow/flight/integration_tests/test_integration.cc
index 2e5609b6c0e50..7bdd27da79981 100644
--- a/cpp/src/arrow/flight/integration_tests/test_integration.cc
+++ b/cpp/src/arrow/flight/integration_tests/test_integration.cc
@@ -580,8 +580,10 @@ class FlightSqlScenario : public Scenario {
ARROW_ASSIGN_OR_RAISE(auto actual_schema, reader->GetSchema());
- AssertSchemaEqual(expected_schema, actual_schema);
-
+ if (!actual_schema->Equals(*expected_schema, /*check_metadata=*/true)) {
+ return Status::Invalid("Schemas do not match. Expected:\n", *expected_schema,
+ "\nActual:\n", *actual_schema);
+ }
return Status::OK();
}