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-1123: [C++] Update parquet-cpp to use Arrow's AssertArraysEqual
Date Sat, 07 Oct 2017 19:47:38 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master b69669a23 -> 2e0c28e5d


PARQUET-1123: [C++] Update parquet-cpp to use Arrow's AssertArraysEqual

Author: Phillip Cloud <cpcloud@gmail.com>

Closes #408 from cpcloud/PARQUET-1123 and squashes the following commits:

771effb [Phillip Cloud] PARQUET-1123: [C++] Update parquet-cpp to use Arrow's AssertArraysEqual


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

Branch: refs/heads/master
Commit: 2e0c28e5dd188146da452b53a3b6b6cd5feea966
Parents: b69669a
Author: Phillip Cloud <cpcloud@gmail.com>
Authored: Sat Oct 7 15:47:33 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sat Oct 7 15:47:33 2017 -0400

----------------------------------------------------------------------
 benchmarks/CMakeLists.txt                     |  1 +
 cmake_modules/ThirdpartyToolchain.cmake       |  2 +-
 src/parquet/arrow/arrow-reader-writer-test.cc | 18 +++++++++++-------
 3 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/2e0c28e5/benchmarks/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt
index 741523b..9566aec 100644
--- a/benchmarks/CMakeLists.txt
+++ b/benchmarks/CMakeLists.txt
@@ -17,6 +17,7 @@
 
 SET(LINK_LIBS
   ${ARROW_LINK_LIBS}
+  ${PARQUET_MIN_TEST_LIBS}
   thriftstatic)
 
 if (PARQUET_BUILD_BENCHMARKS)

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/2e0c28e5/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 4de3089..3961abd 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -366,7 +366,7 @@ if (NOT ARROW_FOUND)
     -DARROW_BUILD_TESTS=OFF)
 
   if ("$ENV{PARQUET_ARROW_VERSION}" STREQUAL "")
-    set(ARROW_VERSION "808a1433005ce5325ba69b1a65d05e1b547eea2c")
+    set(ARROW_VERSION "8309556c7d2b0e14df1422baa574cf2de8c1bd3b")
   else()
     set(ARROW_VERSION "$ENV{PARQUET_ARROW_VERSION}")
   endif()

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/2e0c28e5/src/parquet/arrow/arrow-reader-writer-test.cc
----------------------------------------------------------------------
diff --git a/src/parquet/arrow/arrow-reader-writer-test.cc b/src/parquet/arrow/arrow-reader-writer-test.cc
index 1786ca5..4fd57ea 100644
--- a/src/parquet/arrow/arrow-reader-writer-test.cc
+++ b/src/parquet/arrow/arrow-reader-writer-test.cc
@@ -369,7 +369,9 @@ static std::shared_ptr<GroupNode> MakeSimpleSchema(const ::arrow::DataType&
type
   return std::static_pointer_cast<GroupNode>(node_);
 }
 
-void AssertArraysEqual(const Array& expected, const Array& actual) {
+namespace internal {
+
+void AssertArraysEqual(const Array &expected, const Array &actual) {
   if (!actual.Equals(expected)) {
     std::stringstream pp_result;
     std::stringstream pp_expected;
@@ -380,6 +382,8 @@ void AssertArraysEqual(const Array& expected, const Array& actual)
{
   }
 }
 
+}  // namespace internal
+
 void AssertChunkedEqual(const ChunkedArray& expected, const ChunkedArray& actual)
{
   ASSERT_EQ(expected.num_chunks(), actual.num_chunks()) << "# chunks unequal";
   if (!actual.Equals(expected)) {
@@ -443,7 +447,7 @@ class TestParquetIO : public ::testing::Test {
     ReaderFromSink(&reader);
     ReadSingleColumnFile(std::move(reader), &out);
 
-    AssertArraysEqual(values, *out);
+    internal::AssertArraysEqual(values, *out);
   }
 
   void ReadTableFromFile(std::unique_ptr<FileReader> reader,
@@ -495,7 +499,7 @@ class TestParquetIO : public ::testing::Test {
     ASSERT_EQ(1, chunked_array->num_chunks());
     auto result = chunked_array->chunk(0);
 
-    AssertArraysEqual(*values, *result);
+    internal::AssertArraysEqual(*values, *result);
   }
 
   void CheckRoundTrip(const std::shared_ptr<Table>& table) {
@@ -560,7 +564,7 @@ TYPED_TEST(TestParquetIO, SingleColumnTableRequiredWrite) {
   std::shared_ptr<ChunkedArray> chunked_array = out->column(0)->data();
   ASSERT_EQ(1, chunked_array->num_chunks());
 
-  AssertArraysEqual(*values, *chunked_array->chunk(0));
+  internal::AssertArraysEqual(*values, *chunked_array->chunk(0));
 }
 
 TYPED_TEST(TestParquetIO, SingleColumnOptionalReadWrite) {
@@ -725,7 +729,7 @@ TYPED_TEST(TestParquetIO, SingleColumnTableRequiredChunkedWriteArrowIO)
{
   std::shared_ptr<ChunkedArray> chunked_array = out->column(0)->data();
   ASSERT_EQ(1, chunked_array->num_chunks());
 
-  AssertArraysEqual(*values, *chunked_array->chunk(0));
+  internal::AssertArraysEqual(*values, *chunked_array->chunk(0));
 }
 
 TYPED_TEST(TestParquetIO, SingleColumnOptionalChunkedWrite) {
@@ -897,7 +901,7 @@ TEST_F(TestStringParquetIO, EmptyStringColumnRequiredWrite) {
   std::shared_ptr<ChunkedArray> chunked_array = out->column(0)->data();
   ASSERT_EQ(1, chunked_array->num_chunks());
 
-  AssertArraysEqual(*values, *chunked_array->chunk(0));
+  internal::AssertArraysEqual(*values, *chunked_array->chunk(0));
 }
 
 using TestNullParquetIO = TestParquetIO<::arrow::NullType>;
@@ -919,7 +923,7 @@ TEST_F(TestNullParquetIO, NullColumn) {
   std::shared_ptr<ChunkedArray> chunked_array = out->column(0)->data();
   ASSERT_EQ(1, chunked_array->num_chunks());
 
-  AssertArraysEqual(*values, *chunked_array->chunk(0));
+  internal::AssertArraysEqual(*values, *chunked_array->chunk(0));
 }
 
 template <typename T>


Mime
View raw message