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-724: Test more advanced properties setting
Date Thu, 22 Sep 2016 03:50:35 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 4a7bf1174 -> cd14a3d0f


PARQUET-724: Test more advanced properties setting

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #166 from xhochy/parquet-724 and squashes the following commits:

8b32f5f [Uwe L. Korn] PARQUET-724: Test more advanced properties setting


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

Branch: refs/heads/master
Commit: cd14a3d0fd0dbd980113d0288f71001459431370
Parents: 4a7bf11
Author: Uwe L. Korn <uwelk@xhochy.com>
Authored: Wed Sep 21 23:50:27 2016 -0400
Committer: Wes McKinney <wesm@apache.org>
Committed: Wed Sep 21 23:50:27 2016 -0400

----------------------------------------------------------------------
 src/parquet/column/properties-test.cc | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/cd14a3d0/src/parquet/column/properties-test.cc
----------------------------------------------------------------------
diff --git a/src/parquet/column/properties-test.cc b/src/parquet/column/properties-test.cc
index 0d7314b..07247cf 100644
--- a/src/parquet/column/properties-test.cc
+++ b/src/parquet/column/properties-test.cc
@@ -24,6 +24,8 @@
 
 namespace parquet {
 
+using schema::ColumnPath;
+
 namespace test {
 
 TEST(TestReaderProperties, Basics) {
@@ -41,5 +43,22 @@ TEST(TestWriterProperties, Basics) {
   ASSERT_EQ(DEFAULT_WRITER_VERSION, props->version());
 }
 
+TEST(TestWriterProperties, AdvancedHandling) {
+  WriterProperties::Builder builder;
+  builder.compression("gzip", Compression::GZIP);
+  builder.compression(Compression::SNAPPY);
+  builder.encoding(Encoding::DELTA_BINARY_PACKED);
+  builder.encoding("delta-length", Encoding::DELTA_LENGTH_BYTE_ARRAY);
+  std::shared_ptr<WriterProperties> props = builder.build();
+
+  ASSERT_EQ(Compression::GZIP, props->compression(ColumnPath::FromDotString("gzip")));
+  ASSERT_EQ(
+      Compression::SNAPPY, props->compression(ColumnPath::FromDotString("delta-length")));
+  ASSERT_EQ(
+      Encoding::DELTA_BINARY_PACKED, props->encoding(ColumnPath::FromDotString("gzip")));
+  ASSERT_EQ(Encoding::DELTA_LENGTH_BYTE_ARRAY,
+      props->encoding(ColumnPath::FromDotString("delta-length")));
+}
+
 }  // namespace test
 }  // namespace parquet


Mime
View raw message