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 2017/12/29 16:43:12 UTC
[parquet-cpp] branch master updated: PARQUET-1180: Fix behaviour of
num_children element of primitive nodes
This is an automated email from the ASF dual-hosted git repository.
uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new 7ff7beb PARQUET-1180: Fix behaviour of num_children element of primitive nodes
7ff7beb is described below
commit 7ff7bebcba2c95f51403052547922b50828c340e
Author: Alec Posney <ap...@atlassian.com>
AuthorDate: Fri Dec 29 17:43:06 2017 +0100
PARQUET-1180: Fix behaviour of num_children element of primitive nodes
Per the parquet.thift spec, for primitive nodes the num_children schema
attibute should remain unset. This is implemeted correctly in parquet-mr
see [1]. However currently parquet-cpp does set the num_children
attribute to 0 if it is a primitive node. This pull requests fixes this
issue and the tests that were relying on this behavior
[1] parquet-mr/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java
Author: Alec Posney <ap...@atlassian.com>
Closes #427 from Posnet/fix-primite-node-num-children and squashes the following commits:
e5af5c6 [Alec Posney] Fix behavior of num_children element of primitive nodes
---
src/parquet/schema-test.cc | 1 -
src/parquet/schema.cc | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/parquet/schema-test.cc b/src/parquet/schema-test.cc
index f806c12..c8cce9f 100644
--- a/src/parquet/schema-test.cc
+++ b/src/parquet/schema-test.cc
@@ -47,7 +47,6 @@ static inline SchemaElement NewPrimitive(const std::string& name,
result.__set_name(name);
result.__set_repetition_type(repetition);
result.__set_type(type);
- result.__set_num_children(0);
return result;
}
diff --git a/src/parquet/schema.cc b/src/parquet/schema.cc
index fa6116f..6075ab6 100644
--- a/src/parquet/schema.cc
+++ b/src/parquet/schema.cc
@@ -350,7 +350,6 @@ void PrimitiveNode::ToParquet(void* opaque_element) const {
format::SchemaElement* element = static_cast<format::SchemaElement*>(opaque_element);
element->__set_name(name_);
- element->__set_num_children(0);
element->__set_repetition_type(ToThrift(repetition_));
if (logical_type_ != LogicalType::NONE) {
element->__set_converted_type(ToThrift(logical_type_));
--
To stop receiving notification emails like this one, please contact
['"commits@parquet.apache.org" <co...@parquet.apache.org>'].