19 #include <parquet/schema.h>
20 #include <parquet/types.h>
24 namespace foreign_storage {
32 std::list<Chunk_NS::Chunk>& chunks,
33 std::list<std::unique_ptr<ChunkMetadata>>& chunk_metadata,
34 const bool geo_validate_geometry)
39 const int16_t* rep_levels,
40 const int64_t values_read,
41 const int64_t levels_read,
42 int8_t* values)
override {
43 auto parquet_data_ptr =
reinterpret_cast<const parquet::ByteArray*
>(values);
47 for (int64_t i = 0, j = 0; i < levels_read; ++i) {
49 if (def_levels[i] == 0) {
57 CHECK(j < values_read);
58 auto& byte_array = parquet_data_ptr[j++];
59 auto geo_string_view = std::string_view{
60 reinterpret_cast<const char*
>(byte_array.ptr), byte_array.len};
63 }
catch (
const std::runtime_error& error) {
86 const int16_t* rep_levels,
87 const int64_t values_read,
88 const int64_t levels_read,
89 int8_t* values)
override {
93 appendData(def_levels, rep_levels, values_read, levels_read, values);
void processNullGeoElement()
bool is_error_tracking_enabled_
RejectedRowIndices invalid_indices_
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 appendArrayDatumsToBufferAndUpdateMetadata()
void processGeoElement(std::string_view geo_string_view)
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 appendBaseDataAndUpdateMetadata(const int64_t row_count)
ParquetGeospatialEncoder(const bool geo_validate_geometry)
size_t current_chunk_offset_
ParquetGeospatialEncoder(const parquet::ColumnDescriptor *parquet_column_descriptor, std::list< Chunk_NS::Chunk > &chunks, std::list< std::unique_ptr< ChunkMetadata >> &chunk_metadata, const bool geo_validate_geometry)