message: Export record batch reader
diff: -#include <arrow/type_traits.h>
  -#define CATCH_CONFIG_MAIN
  +#include "duckdb/common/helper.hpp"
  #include "arrow/array.h"
  #include "arrow/array/builder_primitive.h"
  +#include "arrow/c/abi.h"
  #include "arrow/c/bridge.h"
  #include "arrow/record_batch.h"
  #include "arrow/result.h"
  #include "arrow/status.h"
  #include "arrow/type.h"
  #include "arrow/type_fwd.h"
  +
  +#include <arrow/type_traits.h>
  +#include <memory>
  +
  +#define CATCH_CONFIG_MAIN
  #include "catch.hpp"
  static arrow::Result<std::shared_ptr<arrow::Array>> GenI32Seq(int32_t n, int32_t &next) {
  @@ -19,7 +24,9 @@ static arrow::Result<std::shared_ptr<arrow::Array>> GenI32Seq(int32_t n, int32_t
  }
  constexpr size_t ARRAY_SIZE = 1024;
  -#define REQUIRE_RESULT(OUT, IN) REQUIRE(IN.ok()); OUT = IN.ValueUnsafe();
  +#define REQUIRE_RESULT(OUT, IN) \
  + REQUIRE(IN.ok()); \
  + OUT = IN.ValueUnsafe();
  TEST_CASE("Test random integers") {
  @@ -39,11 +46,18 @@ TEST_CASE("Test random integers") {
  REQUIRE_RESULT(auto a, GenI32Seq(ofs, next_a));
  REQUIRE_RESULT(auto b, GenI32Seq(ofs, next_b));
  REQUIRE_RESULT(auto c, GenI32Seq(ofs, next_c));
  - batches.push_back(
  - arrow::RecordBatch::Make(schema, here, {a, b, c}));
  + batches.push_back(arrow::RecordBatch::Make(schema, here, {a, b, c}));
  ofs += ARRAY_SIZE;
  }
  - REQUIRE_RESULT(auto maybe_reader, arrow::RecordBatchReader::Make(std::move(batches), schema));
  + REQUIRE_RESULT(auto reader, arrow::RecordBatchReader::Make(std::move(batches), schema));
  +
  + auto stream = duckdb::make_unique<::ArrowArrayStream>();
  + REQUIRE(arrow::ExportRecordBatchReader(reader, stream.get()).ok());
  +
  + if (stream->release) {
  + stream->release(stream.get());
  + stream->release = nullptr;
  + }
  }
  }
  }
  \ No newline at end of file
  