From 90eb17019e0d531151d7800a4d55e8e551791cb4 Mon Sep 17 00:00:00 2001 From: Devavret Makkar Date: Tue, 21 Dec 2021 03:52:16 +0530 Subject: [PATCH 1/2] Rename aggregate_metadata in writer to fix name collision --- cpp/src/io/parquet/writer_impl.cu | 14 +++++++------- cpp/src/io/parquet/writer_impl.hpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index aceb3bfbec1..c1b67cbda07 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -79,12 +79,12 @@ parquet::Compression to_parquet_compression(compression_type compression) } // namespace -struct aggregate_metadata { - aggregate_metadata(std::vector const& partitions, - size_type num_columns, - std::vector schema, - statistics_freq stats_granularity, - std::vector> const& kv_md) +struct aggregate_writer_metadata { + aggregate_writer_metadata(std::vector const& partitions, + size_type num_columns, + std::vector schema, + statistics_freq stats_granularity, + std::vector> const& kv_md) : version(1), schema(std::move(schema)), files(partitions.size()) { for (size_t i = 0; i < partitions.size(); ++i) { @@ -1226,7 +1226,7 @@ void writer::impl::write(table_view const& table, std::vector co std::vector this_table_schema(schema_tree.begin(), schema_tree.end()); if (!md) { - md = std::make_unique( + md = std::make_unique( partitions, num_columns, std::move(this_table_schema), stats_granularity_, kv_md); } else { // verify the user isn't passing mismatched tables diff --git a/cpp/src/io/parquet/writer_impl.hpp b/cpp/src/io/parquet/writer_impl.hpp index 1cefb91c904..e41832aaabe 100644 --- a/cpp/src/io/parquet/writer_impl.hpp +++ b/cpp/src/io/parquet/writer_impl.hpp @@ -45,7 +45,7 @@ namespace detail { namespace parquet { // Forward internal classes struct parquet_column_view; -struct aggregate_metadata; +struct aggregate_writer_metadata; using namespace cudf::io::parquet; using namespace cudf::io; @@ -214,7 +214,7 @@ class writer::impl { statistics_freq stats_granularity_ = statistics_freq::STATISTICS_NONE; bool int96_timestamps = false; // Overall file metadata. Filled in during the process and written during write_chunked_end() - std::unique_ptr md; + std::unique_ptr md; // File footer key-value metadata. Written during write_chunked_end() std::vector> kv_md; // optional user metadata From b32f8a7a12889cc24730f9219e65c01d9c51b9e2 Mon Sep 17 00:00:00 2001 From: Devavret Makkar Date: Wed, 5 Jan 2022 04:09:15 +0530 Subject: [PATCH 2/2] Rename reader aaggregate_metadata --- cpp/src/io/parquet/reader_impl.cu | 8 ++++---- cpp/src/io/parquet/reader_impl.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/src/io/parquet/reader_impl.cu b/cpp/src/io/parquet/reader_impl.cu index 69d480edf85..957cc85454c 100644 --- a/cpp/src/io/parquet/reader_impl.cu +++ b/cpp/src/io/parquet/reader_impl.cu @@ -301,7 +301,7 @@ struct metadata : public FileMetaData { } }; -class aggregate_metadata { +class aggregate_reader_metadata { std::vector const per_file_metadata; std::map const agg_keyval_map; size_type const num_rows; @@ -357,7 +357,7 @@ class aggregate_metadata { } public: - aggregate_metadata(std::vector> const& sources) + aggregate_reader_metadata(std::vector> const& sources) : per_file_metadata(metadatas_from_sources(sources)), agg_keyval_map(merge_keyval_metadata()), num_rows(calc_num_rows()), @@ -822,7 +822,7 @@ class aggregate_metadata { */ void generate_depth_remappings(std::map, std::vector>>& remap, int src_col_schema, - aggregate_metadata const& md) + aggregate_reader_metadata const& md) { // already generated for this level if (remap.find(src_col_schema) != remap.end()) { return; } @@ -1587,7 +1587,7 @@ reader::impl::impl(std::vector>&& sources, : _mr(mr), _sources(std::move(sources)) { // Open and parse the source dataset metadata - _metadata = std::make_unique(_sources); + _metadata = std::make_unique(_sources); // Override output timestamp resolution if requested if (options.get_timestamp_type().id() != type_id::EMPTY) { diff --git a/cpp/src/io/parquet/reader_impl.hpp b/cpp/src/io/parquet/reader_impl.hpp index 6564c4120a8..01fca5a8b50 100644 --- a/cpp/src/io/parquet/reader_impl.hpp +++ b/cpp/src/io/parquet/reader_impl.hpp @@ -46,7 +46,7 @@ using namespace cudf::io::parquet; using namespace cudf::io; // Forward declarations -class aggregate_metadata; +class aggregate_reader_metadata; /** * @brief Implementation for Parquet reader @@ -199,7 +199,7 @@ class reader::impl { private: rmm::mr::device_memory_resource* _mr = nullptr; std::vector> _sources; - std::unique_ptr _metadata; + std::unique_ptr _metadata; // input columns to be processed std::vector _input_columns;