22 #include <parquet/schema.h>
23 #include <parquet/types.h>
25 namespace foreign_storage {
37 const int16_t* rep_levels,
38 const int64_t values_read,
39 const int64_t levels_read,
40 int8_t* values)
override {
41 CHECK(levels_read > 0);
45 auto parquet_data_ptr =
reinterpret_cast<const parquet::ByteArray*
>(values);
50 for (int64_t i = 0, j = 0; i < levels_read; ++i) {
52 CHECK(j < values_read);
53 auto& byte_array = parquet_data_ptr[j++];
58 total_len += byte_array.len;
61 offsets[i] = last_offset + total_len;
68 for (int64_t i = 0, j = 0; i < levels_read; ++i) {
70 CHECK(j < values_read);
71 auto& byte_array = parquet_data_ptr[j++];
77 memcpy(
encode_buffer_.data() + total_len, byte_array.ptr, byte_array.len);
78 total_len += byte_array.len;
94 const int16_t* rep_levels,
95 const int64_t values_read,
96 const int64_t levels_read,
97 int8_t* values)
override {
99 appendData(def_levels, rep_levels, values_read, levels_read, values);
void appendDataTrackErrors(const int16_t *def_levels, const int16_t *rep_levels, const int64_t values_read, const int64_t levels_read, int8_t *values) override
Data_Namespace::AbstractBuffer * index_buffer_
bool is_error_tracking_enabled_
RejectedRowIndices invalid_indices_
void writeInitialOffsetIfApplicable()
std::vector< int8_t > encode_buffer_
void appendData(const int16_t *def_levels, const int16_t *rep_levels, const int64_t values_read, const int64_t levels_read, int8_t *values) override
An AbstractBuffer is a unit of data management for a data manager.
virtual void append(int8_t *src, const size_t num_bytes, const MemoryLevel src_buffer_type=CPU_LEVEL, const int device_id=-1)=0
ParquetStringNoneEncoder(Data_Namespace::AbstractBuffer *buffer, Data_Namespace::AbstractBuffer *index_buffer)
HOST DEVICE size_t get_max_strlen() const
Data_Namespace::AbstractBuffer * buffer_
virtual void reserve(size_t num_bytes)=0
size_t current_chunk_offset_