24 #include <parquet/schema.h>
25 #include <parquet/types.h>
27 namespace foreign_storage {
38 void copy(
const int8_t* omnisci_data_bytes_source,
39 int8_t* omnisci_data_bytes_destination)
override {
44 int8_t* omnisci_data_bytes)
override {
49 int8_t* omnisci_data_bytes,
50 const size_t num_elements)
override {
57 auto parquet_data_ptr =
reinterpret_cast<const parquet::ByteArray*
>(parquet_data);
58 auto& byte_array = parquet_data_ptr[j];
65 const int64_t j)
const override {
80 const int16_t* rep_levels,
81 const int64_t values_read,
82 const int64_t levels_read,
90 const int16_t* rep_levels,
91 const int64_t values_read,
92 const int64_t levels_read,
93 int8_t* values)
override {
94 CHECK(levels_read > 0);
96 auto parquet_data_ptr =
reinterpret_cast<const parquet::ByteArray*
>(values);
98 for (int64_t i = 0, j = 0; i < levels_read; ++i) {
100 CHECK(j < values_read);
101 auto& byte_array = parquet_data_ptr[j++];
108 std::string{
reinterpret_cast<const char*
>(byte_array.ptr), byte_array.len};
121 const int16_t* rep_levels,
122 const int64_t values_read,
123 const int64_t levels_read,
124 int8_t* values)
override {
126 appendData(def_levels, rep_levels, values_read, levels_read, values);
void validateUsingEncodersColumnType(const int8_t *parquet_data, const int64_t j) const override
bool is_error_tracking_enabled_
RejectedRowIndices invalid_indices_
ParquetDetectStringEncoder(Data_Namespace::AbstractBuffer *buffer)
void setNull(int8_t *omnisci_data_bytes) override
void encodeAndCopyContiguous(const int8_t *parquet_data_bytes, int8_t *omnisci_data_bytes, const size_t num_elements) override
TypedParquetDetectBuffer * detect_buffer_
std::set< int64_t > InvalidRowGroupIndices
void appendValue(const std::string &value)
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 encodeAndCopy(const int8_t *parquet_data_bytes, int8_t *omnisci_data_bytes) override
An AbstractBuffer is a unit of data management for a data manager.
void validate(const int8_t *parquet_data, const int64_t j, const SQLTypeInfo &column_type) const 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 copy(const int8_t *omnisci_data_bytes_source, int8_t *omnisci_data_bytes_destination) override
std::string encodedDataToString(const int8_t *bytes) const override
static constexpr size_t MAX_STRLEN
void eraseInvalidIndicesInBuffer(const InvalidRowGroupIndices &invalid_indices) override
Data_Namespace::AbstractBuffer * buffer_
size_t current_chunk_offset_
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