Skip to content

Commit d9c7180

Browse files
committed
fix windows build
1 parent 1b7249c commit d9c7180

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

src/iceberg/avro/avro_stream_internal.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
#include <arrow/io/interfaces.h>
2323
#include <avro/Stream.hh>
2424

25+
#include "iceberg/iceberg_bundle_export.h"
26+
2527
namespace iceberg::avro {
2628

27-
class AvroInputStream : public ::avro::SeekableInputStream {
29+
class ICEBERG_BUNDLE_EXPORT AvroInputStream : public ::avro::SeekableInputStream {
2830
public:
2931
explicit AvroInputStream(std::shared_ptr<::arrow::io::RandomAccessFile> input_stream,
3032
int64_t buffer_size);
@@ -62,7 +64,7 @@ class AvroInputStream : public ::avro::SeekableInputStream {
6264
size_t available_bytes_ = 0; // bytes available in the buffer
6365
};
6466

65-
class AvroOutputStream : public ::avro::OutputStream {
67+
class ICEBERG_BUNDLE_EXPORT AvroOutputStream : public ::avro::OutputStream {
6668
public:
6769
explicit AvroOutputStream(std::shared_ptr<::arrow::io::OutputStream> output_stream,
6870
int64_t buffer_size);

src/iceberg/expected.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ inline constexpr bool is_error_type_valid_v = is_error_type_valid<T>::value;
122122
} // namespace expected_detail
123123

124124
template <class E>
125-
class ICEBERG_EXPORT [[nodiscard]] unexpected {
125+
class [[nodiscard]] unexpected {
126126
public:
127127
static_assert(expected_detail::is_error_type_valid_v<E>);
128128

@@ -192,7 +192,7 @@ class ICEBERG_EXPORT [[nodiscard]] unexpected {
192192
template <class E>
193193
unexpected(E) -> unexpected<E>;
194194

195-
struct ICEBERG_EXPORT unexpect_t {
195+
struct unexpect_t {
196196
explicit unexpect_t() = default;
197197
};
198198
inline constexpr unexpect_t unexpect{};
@@ -201,7 +201,7 @@ template <class E>
201201
class bad_expected_access;
202202

203203
template <>
204-
class ICEBERG_EXPORT bad_expected_access<void> : public std::exception {
204+
class bad_expected_access<void> : public std::exception {
205205
public:
206206
const char* what() const noexcept override { return "Bad expected access"; }
207207

@@ -214,7 +214,7 @@ class ICEBERG_EXPORT bad_expected_access<void> : public std::exception {
214214
};
215215

216216
template <class E>
217-
class ICEBERG_EXPORT bad_expected_access : public bad_expected_access<void> {
217+
class bad_expected_access : public bad_expected_access<void> {
218218
public:
219219
explicit bad_expected_access(E e) noexcept(std::is_nothrow_move_constructible_v<E>)
220220
: m_val(std::move(e)) {}
@@ -1006,9 +1006,8 @@ struct default_ctor_base<T, E, false> {
10061006
/// tracked by the expected object.
10071007

10081008
template <class T, class E>
1009-
class ICEBERG_EXPORT [[nodiscard]] expected
1010-
: private expected_detail::move_assign_base<T, E>,
1011-
private expected_detail::default_ctor_base<T, E> {
1009+
class [[nodiscard]] expected : private expected_detail::move_assign_base<T, E>,
1010+
private expected_detail::default_ctor_base<T, E> {
10121011
static_assert(expected_detail::is_value_type_valid_v<T>);
10131012
static_assert(expected_detail::is_error_type_valid_v<E>);
10141013

@@ -1798,7 +1797,7 @@ constexpr void swap(expected<T, E>& lhs,
17981797
}
17991798

18001799
template <class E>
1801-
class ICEBERG_EXPORT [[nodiscard]] expected<void, E>
1800+
class [[nodiscard]] expected<void, E>
18021801
: private expected_detail::move_assign_base<void, E>,
18031802
private expected_detail::default_ctor_base<void, E> {
18041803
static_assert(expected_detail::is_error_type_valid_v<E>);
@@ -2349,8 +2348,8 @@ class ICEBERG_EXPORT [[nodiscard]] expected<void, E>
23492348
// standalone swap for void value type
23502349
template <class E, std::enable_if_t<std::is_move_constructible_v<E> &&
23512350
std::is_swappable_v<E>>* = nullptr>
2352-
ICEBERG_EXPORT constexpr void swap(
2353-
expected<void, E>& lhs, expected<void, E>& rhs) noexcept(noexcept(lhs.swap(rhs))) {
2351+
constexpr void swap(expected<void, E>& lhs,
2352+
expected<void, E>& rhs) noexcept(noexcept(lhs.swap(rhs))) {
23542353
lhs.swap(rhs);
23552354
}
23562355

src/iceberg/schema_internal.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include <nanoarrow/nanoarrow.h>
2626

27+
#include "iceberg/iceberg_export.h"
2728
#include "iceberg/result.h"
2829
#include "iceberg/type_fwd.h"
2930

@@ -39,22 +40,22 @@ constexpr std::string_view kFieldIdKey = "ICEBERG:field_id";
3940
/// \param[in] schema The Iceberg schema to convert.
4041
/// \param[out] out The Arrow schema to convert to.
4142
/// \return An error if the conversion fails.
42-
Status ToArrowSchema(const Schema& schema, ArrowSchema* out);
43+
ICEBERG_EXPORT Status ToArrowSchema(const Schema& schema, ArrowSchema* out);
4344

4445
/// \brief Convert an Arrow schema to an Iceberg schema.
4546
///
4647
/// \param[in] schema The Arrow schema to convert.
4748
/// \param[in] schema_id The schema ID of the Iceberg schema.
4849
/// \return The Iceberg schema or an error if the conversion fails.
49-
Result<std::unique_ptr<Schema>> FromArrowSchema(const ArrowSchema& schema,
50-
std::optional<int32_t> schema_id);
50+
ICEBERG_EXPORT Result<std::unique_ptr<Schema>> FromArrowSchema(
51+
const ArrowSchema& schema, std::optional<int32_t> schema_id);
5152

5253
/// \brief Convert a struct type to an Iceberg schema.
5354
///
5455
/// \param[in] struct_type The struct type to convert.
5556
/// \param[in] schema_id The schema ID of the Iceberg schema.
5657
/// \return The Iceberg schema.
57-
std::unique_ptr<Schema> FromStructType(StructType&& struct_type,
58-
std::optional<int32_t> schema_id);
58+
ICEBERG_EXPORT std::unique_ptr<Schema> FromStructType(StructType&& struct_type,
59+
std::optional<int32_t> schema_id);
5960

6061
} // namespace iceberg

0 commit comments

Comments
 (0)