Skip to content

Commit 8ab40c0

Browse files
committed
add missing export
1 parent 33e6e8d commit 8ab40c0

15 files changed

+62
-50
lines changed

src/iceberg/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ list(APPEND
9898
list(APPEND
9999
ICEBERG_STATIC_INSTALL_INTERFACE_LIBS
100100
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,iceberg::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_static>,nanoarrow::nanoarrow_static,nanoarrow::nanoarrow_shared>>"
101-
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
101+
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,nlohmann_json::nlohmann_json>"
102102
"$<IF:$<BOOL:${CROARING_VENDORED}>,iceberg::roaring,roaring::roaring>"
103103
"$<IF:$<BOOL:${SPDLOG_VENDORED}>,iceberg::spdlog,spdlog::spdlog>")
104104
list(APPEND
105105
ICEBERG_SHARED_INSTALL_INTERFACE_LIBS
106106
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,iceberg::nanoarrow_shared,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
107-
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
107+
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,nlohmann_json::nlohmann_json>"
108108
"$<IF:$<BOOL:${CROARING_VENDORED}>,iceberg::roaring,roaring::roaring>"
109109
"$<IF:$<BOOL:${SPDLOG_VENDORED}>,iceberg::spdlog,spdlog::spdlog>")
110110

src/iceberg/arrow_c_data_guard_internal.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
#include <nanoarrow/nanoarrow.h>
2323

24-
#include "iceberg/arrow_c_data.h"
24+
#include "iceberg/iceberg_export.h"
2525

2626
namespace iceberg::internal {
2727

28-
class ArrowArrayGuard {
28+
class ICEBERG_EXPORT ArrowArrayGuard {
2929
public:
3030
explicit ArrowArrayGuard(ArrowArray* array) : array_(array) {}
3131
~ArrowArrayGuard();
@@ -34,7 +34,7 @@ class ArrowArrayGuard {
3434
ArrowArray* array_;
3535
};
3636

37-
class ArrowSchemaGuard {
37+
class ICEBERG_EXPORT ArrowSchemaGuard {
3838
public:
3939
explicit ArrowSchemaGuard(ArrowSchema* schema) : schema_(schema) {}
4040
~ArrowSchemaGuard();
@@ -43,7 +43,7 @@ class ArrowSchemaGuard {
4343
ArrowSchema* schema_;
4444
};
4545

46-
class ArrowArrayViewGuard {
46+
class ICEBERG_EXPORT ArrowArrayViewGuard {
4747
public:
4848
explicit ArrowArrayViewGuard(ArrowArrayView* view) : view_(view) {}
4949
~ArrowArrayViewGuard();
@@ -52,7 +52,7 @@ class ArrowArrayViewGuard {
5252
ArrowArrayView* view_;
5353
};
5454

55-
class ArrowArrayBufferGuard {
55+
class ICEBERG_EXPORT ArrowArrayBufferGuard {
5656
public:
5757
explicit ArrowArrayBufferGuard(ArrowBuffer* buffer) : buffer_(buffer) {}
5858
~ArrowArrayBufferGuard();

src/iceberg/avro/avro_data_util_internal.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <arrow/array/builder_base.h>
2323
#include <avro/GenericDatum.hh>
2424

25+
#include "iceberg/iceberg_bundle_export.h"
2526
#include "iceberg/schema_util.h"
2627

2728
namespace iceberg::avro {
@@ -37,19 +38,20 @@ namespace iceberg::avro {
3738
/// \param projected_schema The projected schema
3839
/// \param array_builder The Arrow array builder to append to (must be a struct builder)
3940
/// \return Status indicating success or failure
40-
Status AppendDatumToBuilder(const ::avro::NodePtr& avro_node,
41-
const ::avro::GenericDatum& avro_datum,
42-
const SchemaProjection& projection,
43-
const Schema& projected_schema,
44-
::arrow::ArrayBuilder* array_builder);
41+
ICEBERG_BUNDLE_EXPORT Status AppendDatumToBuilder(const ::avro::NodePtr& avro_node,
42+
const ::avro::GenericDatum& avro_datum,
43+
const SchemaProjection& projection,
44+
const Schema& projected_schema,
45+
::arrow::ArrayBuilder* array_builder);
4546

4647
/// \brief Extract an Avro datum from an Arrow array.
4748
///
4849
/// \param array The Arrow array to extract from.
4950
/// \param index The index of the element to extract.
5051
/// \param datum The Avro datum to extract to. Its Avro type should be consistent with the
5152
/// Arrow type.
52-
Status ExtractDatumFromArray(const ::arrow::Array& array, int64_t index,
53-
::avro::GenericDatum* datum);
53+
ICEBERG_BUNDLE_EXPORT Status ExtractDatumFromArray(const ::arrow::Array& array,
54+
int64_t index,
55+
::avro::GenericDatum* datum);
5456

5557
} // namespace iceberg::avro

src/iceberg/avro/avro_schema_util_internal.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include <avro/Node.hh>
2525

26+
#include "iceberg/iceberg_bundle_export.h"
2627
#include "iceberg/name_mapping.h"
2728
#include "iceberg/result.h"
2829
#include "iceberg/schema_util.h"
@@ -40,7 +41,7 @@ struct MapLogicalType : public ::avro::CustomLogicalType {
4041
};
4142

4243
/// \brief A visitor that converts an Iceberg type to an Avro node.
43-
class ToAvroNodeVisitor {
44+
class ICEBERG_BUNDLE_EXPORT ToAvroNodeVisitor {
4445
public:
4546
Status Visit(const BooleanType& type, ::avro::NodePtr* node);
4647
Status Visit(const IntType& type, ::avro::NodePtr* node);
@@ -67,7 +68,7 @@ class ToAvroNodeVisitor {
6768
};
6869

6970
/// \brief A visitor that checks the presence of field IDs in an Avro schema.
70-
class HasIdVisitor {
71+
class ICEBERG_BUNDLE_EXPORT HasIdVisitor {
7172
public:
7273
HasIdVisitor() = default;
7374

@@ -137,8 +138,9 @@ class HasIdVisitor {
137138
/// \param avro_node The Avro node to read data from.
138139
/// \param prune_source Whether the source schema can be pruned.
139140
/// \return The schema projection result.
140-
Result<SchemaProjection> Project(const Schema& expected_schema,
141-
const ::avro::NodePtr& avro_node, bool prune_source);
141+
ICEBERG_BUNDLE_EXPORT Result<SchemaProjection> Project(const Schema& expected_schema,
142+
const ::avro::NodePtr& avro_node,
143+
bool prune_source);
142144

143145
std::string ToString(const ::avro::NodePtr& node);
144146
std::string ToString(const ::avro::LogicalType& logical_type);
@@ -157,14 +159,14 @@ bool HasMapLogicalType(const ::avro::NodePtr& node);
157159
///
158160
/// \param name The name to check.
159161
/// \return True if the name is valid, false otherwise.
160-
bool ValidAvroName(std::string_view name);
162+
ICEBERG_BUNDLE_EXPORT bool ValidAvroName(std::string_view name);
161163

162164
/// \brief Create a new Avro node with field IDs from name mapping.
163165
/// \param original_node The original Avro node to copy.
164166
/// \param mapping The name mapping to apply field IDs from.
165167
/// \return A new Avro node with field IDs applied, or an error.
166-
Result<::avro::NodePtr> MakeAvroNodeWithFieldIds(const ::avro::NodePtr& original_node,
167-
const NameMapping& mapping);
168+
ICEBERG_BUNDLE_EXPORT Result<::avro::NodePtr> MakeAvroNodeWithFieldIds(
169+
const ::avro::NodePtr& original_node, const NameMapping& mapping);
168170

169171
/// \brief Sanitize a field name to make it compatible with Avro field name requirements.
170172
///
@@ -187,6 +189,6 @@ Result<::avro::NodePtr> MakeAvroNodeWithFieldIds(const ::avro::NodePtr& original
187189
///
188190
/// \param field_name The original field name to sanitize.
189191
/// \return A sanitized field name that follows Avro naming conventions.
190-
std::string SanitizeFieldName(std::string_view field_name);
192+
ICEBERG_BUNDLE_EXPORT std::string SanitizeFieldName(std::string_view field_name);
191193

192194
} // namespace iceberg::avro

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/file_reader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct ICEBERG_EXPORT Split {
6868
size_t length;
6969
};
7070

71-
class ReaderProperties : public ConfigBase<ReaderProperties> {
71+
class ICEBERG_EXPORT ReaderProperties : public ConfigBase<ReaderProperties> {
7272
public:
7373
template <typename T>
7474
using Entry = const ConfigBase<ReaderProperties>::Entry<T>;

src/iceberg/file_writer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
namespace iceberg {
3737

38-
class WriterProperties : public ConfigBase<WriterProperties> {
38+
class ICEBERG_EXPORT WriterProperties : public ConfigBase<WriterProperties> {
3939
public:
4040
template <typename T>
4141
using Entry = const ConfigBase<WriterProperties>::Entry<T>;

src/iceberg/parquet/parquet_data_util_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <arrow/type_fwd.h>
2323

24+
#include "iceberg/iceberg_bundle_export.h"
2425
#include "iceberg/schema_util.h"
2526

2627
namespace iceberg::parquet {
@@ -33,7 +34,7 @@ namespace iceberg::parquet {
3334
/// \param projection The projection from projected Iceberg schema to the record batch.
3435
/// \param pool The arrow memory pool.
3536
/// \return The converted record batch.
36-
Result<std::shared_ptr<::arrow::RecordBatch>> ProjectRecordBatch(
37+
ICEBERG_BUNDLE_EXPORT Result<std::shared_ptr<::arrow::RecordBatch>> ProjectRecordBatch(
3738
std::shared_ptr<::arrow::RecordBatch> record_batch,
3839
const std::shared_ptr<::arrow::Schema>& output_arrow_schema,
3940
const Schema& projected_schema, const SchemaProjection& projection,

src/iceberg/parquet/parquet_schema_util_internal.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include <parquet/arrow/schema.h>
2525

26+
#include "iceberg/iceberg_bundle_export.h"
2627
#include "iceberg/schema.h"
2728
#include "iceberg/schema_util.h"
2829

@@ -47,19 +48,21 @@ struct ParquetExtraAttributes : public FieldProjection::ExtraAttributes {
4748
/// \param parquet_schema The Parquet schema to read data from.
4849
/// \return The schema projection result with column indices of projected Parquet columns
4950
/// specified via ParquetExtraAttributes.
50-
Result<SchemaProjection> Project(const Schema& expected_schema,
51-
const ::parquet::arrow::SchemaManifest& parquet_schema);
51+
ICEBERG_BUNDLE_EXPORT Result<SchemaProjection> Project(
52+
const Schema& expected_schema,
53+
const ::parquet::arrow::SchemaManifest& parquet_schema);
5254

5355
/// \brief Get the selected column indices by walking through the projection result.
5456
///
5557
/// \param projection The schema projection result.
5658
/// \return The selected column indices.
57-
std::vector<int32_t> SelectedColumnIndices(const SchemaProjection& projection);
59+
ICEBERG_BUNDLE_EXPORT std::vector<int32_t> SelectedColumnIndices(
60+
const SchemaProjection& projection);
5861

5962
/// \brief Check whether the Parquet schema has field IDs.
6063
///
6164
/// \param root_node The root node of the Parquet schema.
6265
/// \return True if the Parquet schema has field IDs, false otherwise.
63-
bool HasFieldIds(const ::parquet::schema::NodePtr& root_node);
66+
ICEBERG_BUNDLE_EXPORT bool HasFieldIds(const ::parquet::schema::NodePtr& root_node);
6467

6568
} // namespace iceberg::parquet

src/iceberg/schema_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ ICEBERG_EXPORT Status ToArrowSchema(const Schema& schema, ArrowSchema* out);
4242
/// \param[in] schema The Arrow schema to convert.
4343
/// \param[in] schema_id The schema ID of the Iceberg schema.
4444
/// \return The Iceberg schema or an error if the conversion fails.
45-
Result<std::unique_ptr<Schema>> FromArrowSchema(const ArrowSchema& schema,
46-
std::optional<int32_t> schema_id);
45+
ICEBERG_EXPORT Result<std::unique_ptr<Schema>> FromArrowSchema(
46+
const ArrowSchema& schema, std::optional<int32_t> schema_id);
4747

4848
/// \brief Convert a struct type to an Iceberg schema.
4949
///

0 commit comments

Comments
 (0)