|
29 | 29 | #include "arrow/buffer.h" |
30 | 30 | #include "arrow/buffer_builder.h" |
31 | 31 | #include "arrow/status.h" |
32 | | -#include "arrow/type.h" |
| 32 | +#include "arrow/type_fwd.h" |
33 | 33 | #include "arrow/util/macros.h" |
34 | 34 | #include "arrow/util/visibility.h" |
35 | 35 |
|
@@ -247,4 +247,24 @@ class ARROW_EXPORT ArrayBuilder { |
247 | 247 | ARROW_DISALLOW_COPY_AND_ASSIGN(ArrayBuilder); |
248 | 248 | }; |
249 | 249 |
|
| 250 | +/// \brief Construct an empty ArrayBuilder corresponding to the data |
| 251 | +/// type |
| 252 | +/// \param[in] pool the MemoryPool to use for allocations |
| 253 | +/// \param[in] type the data type to create the builder for |
| 254 | +/// \param[out] out the created ArrayBuilder |
| 255 | +ARROW_EXPORT |
| 256 | +Status MakeBuilder(MemoryPool* pool, const std::shared_ptr<DataType>& type, |
| 257 | + std::unique_ptr<ArrayBuilder>* out); |
| 258 | + |
| 259 | +/// \brief Construct an empty DictionaryBuilder initialized optionally |
| 260 | +/// with a pre-existing dictionary |
| 261 | +/// \param[in] pool the MemoryPool to use for allocations |
| 262 | +/// \param[in] type the dictionary type to create the builder for |
| 263 | +/// \param[in] dictionary the initial dictionary, if any. May be nullptr |
| 264 | +/// \param[out] out the created ArrayBuilder |
| 265 | +ARROW_EXPORT |
| 266 | +Status MakeDictionaryBuilder(MemoryPool* pool, const std::shared_ptr<DataType>& type, |
| 267 | + const std::shared_ptr<Array>& dictionary, |
| 268 | + std::unique_ptr<ArrayBuilder>* out); |
| 269 | + |
250 | 270 | } // namespace arrow |
0 commit comments