parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-779: Export TypedRowGroupStatistics in libparquet
Date Sat, 26 Nov 2016 19:31:21 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 1219fa48f -> 086d5cc73


PARQUET-779: Export TypedRowGroupStatistics in libparquet

Workaround is necessary because of GCC bug 40068/50044.
`-Wattributes` diagnostic is temporarily disabled, as it seems the easiest solution.

Author: Artem Tarasov <artem.tarasov@embl.de>

Closes #193 from lomereiter/PARQUET-779 and squashes the following commits:

66a17fa [Artem Tarasov] proper gcc compiler detection
835e913 [Artem Tarasov] Expose TypedRowGroupStatistics in libparquet.so


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/086d5cc7
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/086d5cc7
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/086d5cc7

Branch: refs/heads/master
Commit: 086d5cc737f2103c55f1bae68989bd804a8c3ac0
Parents: 1219fa4
Author: Artem Tarasov <artem.tarasov@embl.de>
Authored: Sat Nov 26 14:31:15 2016 -0500
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sat Nov 26 14:31:15 2016 -0500

----------------------------------------------------------------------
 src/parquet/column/statistics.cc | 10 ++++++++
 src/parquet/column/statistics.h  | 47 +++++++++++++++++++++--------------
 2 files changed, 38 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/086d5cc7/src/parquet/column/statistics.cc
----------------------------------------------------------------------
diff --git a/src/parquet/column/statistics.cc b/src/parquet/column/statistics.cc
index e6ac4de..0330ac1 100644
--- a/src/parquet/column/statistics.cc
+++ b/src/parquet/column/statistics.cc
@@ -103,6 +103,16 @@ void TypedRowGroupStatistics<DType>::Update(
 }
 
 template <typename DType>
+const typename DType::c_type& TypedRowGroupStatistics<DType>::min() const {
+  return min_;
+}
+
+template <typename DType>
+const typename DType::c_type& TypedRowGroupStatistics<DType>::max() const {
+  return max_;
+}
+
+template <typename DType>
 void TypedRowGroupStatistics<DType>::Merge(const TypedRowGroupStatistics<DType>&
other) {
   this->MergeCounts(other);
 

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/086d5cc7/src/parquet/column/statistics.h
----------------------------------------------------------------------
diff --git a/src/parquet/column/statistics.h b/src/parquet/column/statistics.h
index 0628ac5..a21a0fa 100644
--- a/src/parquet/column/statistics.h
+++ b/src/parquet/column/statistics.h
@@ -151,8 +151,8 @@ class TypedRowGroupStatistics : public RowGroupStatistics {
 
   void Update(const T* values, int64_t num_not_null, int64_t num_null);
 
-  const T& min() const { return min_; }
-  const T& max() const { return max_; }
+  const T& min() const;
+  const T& max() const;
 
   std::string EncodeMin() override;
   std::string EncodeMax() override;
@@ -202,23 +202,32 @@ void TypedRowGroupStatistics<ByteArrayType>::PlainEncode(const
T& src, std::stri
 template <>
 void TypedRowGroupStatistics<ByteArrayType>::PlainDecode(const std::string& src,
T* dst);
 
-using BoolStatistics = TypedRowGroupStatistics<BooleanType>;
-using Int32Statistics = TypedRowGroupStatistics<Int32Type>;
-using Int64Statistics = TypedRowGroupStatistics<Int64Type>;
-using Int96Statistics = TypedRowGroupStatistics<Int96Type>;
-using FloatStatistics = TypedRowGroupStatistics<FloatType>;
-using DoubleStatistics = TypedRowGroupStatistics<DoubleType>;
-using ByteArrayStatistics = TypedRowGroupStatistics<ByteArrayType>;
-using FLBAStatistics = TypedRowGroupStatistics<FLBAType>;
-
-extern template class TypedRowGroupStatistics<BooleanType>;
-extern template class TypedRowGroupStatistics<Int32Type>;
-extern template class TypedRowGroupStatistics<Int64Type>;
-extern template class TypedRowGroupStatistics<Int96Type>;
-extern template class TypedRowGroupStatistics<FloatType>;
-extern template class TypedRowGroupStatistics<DoubleType>;
-extern template class TypedRowGroupStatistics<ByteArrayType>;
-extern template class TypedRowGroupStatistics<FLBAType>;
+typedef TypedRowGroupStatistics<BooleanType> BoolStatistics;
+typedef TypedRowGroupStatistics<Int32Type> Int32Statistics;
+typedef TypedRowGroupStatistics<Int64Type> Int64Statistics;
+typedef TypedRowGroupStatistics<Int96Type> Int96Statistics;
+typedef TypedRowGroupStatistics<FloatType> FloatStatistics;
+typedef TypedRowGroupStatistics<DoubleType> DoubleStatistics;
+typedef TypedRowGroupStatistics<ByteArrayType> ByteArrayStatistics;
+typedef TypedRowGroupStatistics<FLBAType> FLBAStatistics;
+
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattributes"
+#endif
+
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<BooleanType>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<Int32Type>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<Int64Type>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<Int96Type>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<FloatType>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<DoubleType>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<ByteArrayType>;
+extern template class PARQUET_EXPORT TypedRowGroupStatistics<FLBAType>;
+
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
 
 }  // namespace parquet
 


Mime
View raw message