[
https://issues.apache.org/jira/browse/PARQUET-1323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553652#comment-16553652
]
ASF GitHub Bot commented on PARQUET-1323:
-----------------------------------------
wesm closed pull request #478: PARQUET-1323: Fix compiler warnings on clang-6
URL: https://github.com/apache/parquet-cpp/pull/478
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/src/parquet/arrow/reader.cc b/src/parquet/arrow/reader.cc
index be270a88..0f671b71 100644
--- a/src/parquet/arrow/reader.cc
+++ b/src/parquet/arrow/reader.cc
@@ -165,7 +165,7 @@ class RowGroupRecordBatchReader : public
::arrow::RecordBatchReader {
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 ee91b393..49999a48 100644
--- a/src/parquet/metadata.cc
+++ b/src/parquet/metadata.cc
@@ -66,7 +66,7 @@ static std::shared_ptr<RowGroupStatistics>
MakeTypedColumnStats(
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 5c3958e8..77187819 100644
--- a/src/parquet/schema.cc
+++ b/src/parquet/schema.cc
@@ -690,8 +690,7 @@ ColumnDescriptor::ColumnDescriptor(const schema::NodePtr&
node,
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 b778e51b..1a94ed1f 100644
--- a/src/parquet/schema.h
+++ b/src/parquet/schema.h
@@ -369,11 +369,6 @@ class PARQUET_EXPORT ColumnDescriptor {
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
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [C++] Fix compiler warnings with clang-6.0
> ------------------------------------------
>
> Key: PARQUET-1323
> URL: https://issues.apache.org/jira/browse/PARQUET-1323
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-cpp
> Reporter: Wes McKinney
> Assignee: Wes McKinney
> Priority: Major
> Labels: pull-request-available
> Fix For: cpp-1.5.0
>
>
> Observed when building today
> {code}
> [1/23] Running thrift compiler on parquet.thrift
> [WARNING:/home/wesm/code/parquet-cpp/src/parquet/parquet.thrift:295] The
> "byte" type is a compatibility alias for "i8". Use "i8" to emphasize the
> signedness of this type.
> [15/23] Building CXX object
> CMakeFiles/parquet_objlib.dir/src/parquet/schema.cc.o
> In file included from ../src/parquet/schema.cc:18:
> ../src/parquet/schema.h:376:27: warning: private field 'schema_descr_' is not
> used [-Wunused-private-field]
> const SchemaDescriptor* schema_descr_;
> ^
> 1 warning generated.
> [20/23] Building CXX object
> CMakeFiles/parquet_objlib.dir/src/parquet/metadata.cc.o
> ../src/parquet/metadata.cc:84:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::FIXED_LEN_BYTE_ARRAY:
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ../src/parquet/metadata.cc:82:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::BYTE_ARRAY:
> ^~~~~~~~~~~~~~~~
> ../src/parquet/metadata.cc:80:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::FLOAT:
> ^~~~~~~~~~~
> ../src/parquet/metadata.cc:78:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::DOUBLE:
> ^~~~~~~~~~~~
> ../src/parquet/metadata.cc:76:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::INT96:
> ^~~~~~~~~~~
> ../src/parquet/metadata.cc:74:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::INT64:
> ^~~~~~~~~~~
> ../src/parquet/metadata.cc:72:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::INT32:
> ^~~~~~~~~~~
> ../src/parquet/metadata.cc:70:10: warning: comparison of two values with
> different enumeration types in switch statement ('Type::type' and
> 'parquet::Type::type') [-Wenum-compare-switch]
> case Type::BOOLEAN:
> ^~~~~~~~~~~~~
> 8 warnings generated.
> [23/23] Creating library symlink debug/libparquet.so.1 debug/libparquet.so
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)