PARQUET-1323: Fix compiler warnings on clang-6
The `schema_descr_` field was unused
Author: Wes McKinney <wes.mckinney@twosigma.com>
Closes #478 from wesm/clang-6-warnings and squashes the following commits:
7cadfab [Wes McKinney] Fix compiler warnings on clang-6
diff --git a/src/parquet/arrow/reader.cc b/src/parquet/arrow/reader.cc
index be270a8..0f671b7 100644
--- a/src/parquet/arrow/reader.cc
+++ b/src/parquet/arrow/reader.cc
@@ -165,7 +165,7 @@
file_reader_(reader),
next_row_group_(0) {}
- ~RowGroupRecordBatchReader() {}
+ ~RowGroupRecordBatchReader() override {}
std::shared_ptr<::arrow::Schema> schema() const override { return schema_; }
diff --git a/src/parquet/metadata.cc b/src/parquet/metadata.cc
index ee91b39..49999a4 100644
--- a/src/parquet/metadata.cc
+++ b/src/parquet/metadata.cc
@@ -66,7 +66,7 @@
std::shared_ptr<RowGroupStatistics> MakeColumnStats(
const format::ColumnMetaData& meta_data, const ColumnDescriptor* descr) {
- switch (meta_data.type) {
+ switch (static_cast<Type::type>(meta_data.type)) {
case Type::BOOLEAN:
return MakeTypedColumnStats<BooleanType>(meta_data, descr);
case Type::INT32:
diff --git a/src/parquet/schema.cc b/src/parquet/schema.cc
index 5c3958e..7718781 100644
--- a/src/parquet/schema.cc
+++ b/src/parquet/schema.cc
@@ -690,8 +690,7 @@
const SchemaDescriptor* schema_descr)
: node_(node),
max_definition_level_(max_definition_level),
- max_repetition_level_(max_repetition_level),
- schema_descr_(schema_descr) {
+ max_repetition_level_(max_repetition_level) {
if (!node_->is_primitive()) {
throw ParquetException("Must be a primitive type");
}
diff --git a/src/parquet/schema.h b/src/parquet/schema.h
index b778e51..1a94ed1 100644
--- a/src/parquet/schema.h
+++ b/src/parquet/schema.h
@@ -369,11 +369,6 @@
int16_t max_definition_level_;
int16_t max_repetition_level_;
-
- // When this descriptor is part of a real schema (and not being used for
- // testing purposes), maintain a link back to the parent SchemaDescriptor to
- // enable reverse graph traversals
- const SchemaDescriptor* schema_descr_;
};
// Container for the converted Parquet schema with a computed information from