|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
#include <cstdint> |
|
#include <memory> |
|
|
|
#include "arrow/buffer.h" |
|
#include "arrow/io/interfaces.h" |
|
#include "arrow/status.h" |
|
#include "arrow/type_fwd.h" |
|
#include "arrow/util/macros.h" |
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__) |
|
|
|
# if defined(_MSC_VER) |
|
# pragma warning(push) |
|
|
|
|
|
# pragma warning(disable : 4275 4251) |
|
|
|
# pragma warning(disable : 4250) |
|
|
|
# pragma warning(disable : 4005) |
|
|
|
# pragma warning(disable : 4910) |
|
# else |
|
# pragma GCC diagnostic ignored "-Wattributes" |
|
# endif |
|
|
|
# ifdef PARQUET_STATIC |
|
# define PARQUET_EXPORT |
|
# elif defined(PARQUET_EXPORTING) |
|
# define PARQUET_EXPORT __declspec(dllexport) |
|
# else |
|
# define PARQUET_EXPORT __declspec(dllimport) |
|
# endif |
|
|
|
# define PARQUET_NO_EXPORT |
|
|
|
#else |
|
# ifndef PARQUET_EXPORT |
|
# define PARQUET_EXPORT __attribute__((visibility("default"))) |
|
# endif |
|
# ifndef PARQUET_NO_EXPORT |
|
# define PARQUET_NO_EXPORT __attribute__((visibility("hidden"))) |
|
# endif |
|
#endif |
|
|
|
|
|
|
|
#if defined(_MSC_VER) || defined(__clang__) |
|
# define PARQUET_TEMPLATE_CLASS_EXPORT |
|
# define PARQUET_TEMPLATE_EXPORT PARQUET_EXPORT |
|
#else |
|
# define PARQUET_TEMPLATE_CLASS_EXPORT PARQUET_EXPORT |
|
# define PARQUET_TEMPLATE_EXPORT |
|
#endif |
|
|
|
#define PARQUET_DISALLOW_COPY_AND_ASSIGN ARROW_DISALLOW_COPY_AND_ASSIGN |
|
|
|
#define PARQUET_NORETURN ARROW_NORETURN |
|
#define PARQUET_DEPRECATED ARROW_DEPRECATED |
|
|
|
|
|
|
|
#ifdef ARROW_VALGRIND |
|
# define PARQUET_VALGRIND |
|
#endif |
|
|
|
namespace parquet { |
|
|
|
using Buffer = ::arrow::Buffer; |
|
using Codec = ::arrow::util::Codec; |
|
using CodecOptions = ::arrow::util::CodecOptions; |
|
using Compression = ::arrow::Compression; |
|
using MemoryPool = ::arrow::MemoryPool; |
|
using MutableBuffer = ::arrow::MutableBuffer; |
|
using ResizableBuffer = ::arrow::ResizableBuffer; |
|
using ResizableBuffer = ::arrow::ResizableBuffer; |
|
using ArrowInputFile = ::arrow::io::RandomAccessFile; |
|
using ArrowInputStream = ::arrow::io::InputStream; |
|
using ArrowOutputStream = ::arrow::io::OutputStream; |
|
|
|
constexpr int64_t kDefaultOutputStreamSize = 1024; |
|
|
|
constexpr int16_t kNonPageOrdinal = static_cast<int16_t>(-1); |
|
|
|
PARQUET_EXPORT |
|
std::shared_ptr<::arrow::io::BufferOutputStream> CreateOutputStream( |
|
::arrow::MemoryPool* pool = ::arrow::default_memory_pool()); |
|
|
|
PARQUET_EXPORT |
|
std::shared_ptr<ResizableBuffer> AllocateBuffer( |
|
::arrow::MemoryPool* pool = ::arrow::default_memory_pool(), int64_t size = 0); |
|
|
|
} |
|
|