You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by uw...@apache.org on 2016/09/06 16:29:29 UTC
parquet-cpp git commit: PARQUET-703: Validate that ColumnChunk
metadata counts nulls in num_values
Repository: parquet-cpp
Updated Branches:
refs/heads/master e1b3415d0 -> 05409546f
PARQUET-703: Validate that ColumnChunk metadata counts nulls in num_values
Closes #145 (this bug was fixed as part of other recent patches)
Author: Wes McKinney <we...@twosigma.com>
Closes #152 from wesm/PARQUET-703 and squashes the following commits:
232d2f1 [Wes McKinney] Validate that ColumnChunk metadata has the number of values set including nulls
Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/05409546
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/05409546
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/05409546
Branch: refs/heads/master
Commit: 05409546f9fb94f13b7020347f847cd75837233a
Parents: e1b3415
Author: Wes McKinney <we...@twosigma.com>
Authored: Tue Sep 6 18:29:16 2016 +0200
Committer: Uwe L. Korn <uw...@xhochy.com>
Committed: Tue Sep 6 18:29:16 2016 +0200
----------------------------------------------------------------------
src/parquet/column/column-writer-test.cc | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/05409546/src/parquet/column/column-writer-test.cc
----------------------------------------------------------------------
diff --git a/src/parquet/column/column-writer-test.cc b/src/parquet/column/column-writer-test.cc
index 3806bd0..bdbb7a0 100644
--- a/src/parquet/column/column-writer-test.cc
+++ b/src/parquet/column/column-writer-test.cc
@@ -126,6 +126,10 @@ class TestPrimitiveWriter : public ::testing::Test {
ASSERT_EQ(this->values_, this->values_out_);
}
+ int64_t metadata_num_values() const {
+ return metadata_.meta_data.num_values;
+ }
+
protected:
int64_t values_read_;
// Keep the reader alive as for ByteArray the lifetime of the ByteArray
@@ -247,6 +251,9 @@ TYPED_TEST(TestPrimitiveWriter, Optional) {
this->values_.size(), definition_levels.data(), nullptr, this->values_ptr_);
writer->Close();
+ // PARQUET-703
+ ASSERT_EQ(100, this->metadata_num_values());
+
this->ReadColumn();
ASSERT_EQ(99, this->values_read_);
this->values_out_.resize(99);