22 #include <parquet/schema.h>
23 #include <parquet/types.h>
25 namespace foreign_storage {
36 const int16_t* rep_levels,
37 const int64_t values_read,
38 const int64_t levels_read,
39 int8_t* values)
override {
40 auto parquet_data_ptr =
reinterpret_cast<const parquet::ByteArray*
>(values);
42 for (int64_t i = 0, j = 0; i < levels_read; ++i) {
44 CHECK(j < values_read);
45 auto& byte_array = parquet_data_ptr[j++];
47 std::string{
reinterpret_cast<const char*
>(byte_array.ptr), byte_array.len});
55 const int16_t* rep_levels,
56 const int64_t values_read,
57 const int64_t levels_read,
58 int8_t* values)
override {
59 UNREACHABLE() <<
"unexpected call to appendDataTrackErrors from unsupported encoder";
63 const int16_t* rep_levels,
64 const int64_t values_read,
65 const int64_t levels_read,
69 appendData(def_levels, rep_levels, values_read, levels_read, values);
74 if (invalid_indices.empty()) {
void eraseInvalidData(const FindContainer &invalid_indices)
std::set< int64_t > InvalidRowGroupIndices
TypedParquetStorageBuffer< std::string > * string_buffer_
An AbstractBuffer is a unit of data management for a data manager.
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
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
void validateAndAppendData(const int16_t *def_levels, const int16_t *rep_levels, const int64_t values_read, const int64_t levels_read, int8_t *values, const SQLTypeInfo &column_type, InvalidRowGroupIndices &invalid_indices) override
void reserveNumElements(size_t additional_num_elements)
void eraseInvalidIndicesInBuffer(const InvalidRowGroupIndices &invalid_indices) override
void appendElement(const Type &element)
ParquetStringImportEncoder(Data_Namespace::AbstractBuffer *buffer)