Repository: parquet-cpp Updated Branches: refs/heads/master 3ca5a7034 -> 6224b9c52
PARQUET-643: Add const modifier to schema pointer reference Author: Uwe L. Korn <[email protected]> Closes #128 from xhochy/parquet-643 and squashes the following commits: 6f18fca [Uwe L. Korn] PARQUET-643: Add const modifier to schema pointer reference in ParquetFileWriter Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/6224b9c5 Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/6224b9c5 Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/6224b9c5 Branch: refs/heads/master Commit: 6224b9c524ee3949dff4dde2f8f3cbd708101870 Parents: 3ca5a70 Author: Uwe L. Korn <[email protected]> Authored: Mon Jun 27 09:53:38 2016 -0700 Committer: Wes McKinney <[email protected]> Committed: Mon Jun 27 09:53:38 2016 -0700 ---------------------------------------------------------------------- src/parquet/file/writer-internal.cc | 4 ++-- src/parquet/file/writer-internal.h | 5 +++-- src/parquet/file/writer.cc | 2 +- src/parquet/file/writer.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/6224b9c5/src/parquet/file/writer-internal.cc ---------------------------------------------------------------------- diff --git a/src/parquet/file/writer-internal.cc b/src/parquet/file/writer-internal.cc index e0b1f66..0716325 100644 --- a/src/parquet/file/writer-internal.cc +++ b/src/parquet/file/writer-internal.cc @@ -169,7 +169,7 @@ void RowGroupSerializer::Close() { // FileSerializer std::unique_ptr<ParquetFileWriter::Contents> FileSerializer::Open( - std::shared_ptr<OutputStream> sink, std::shared_ptr<GroupNode>& schema, + std::shared_ptr<OutputStream> sink, const std::shared_ptr<GroupNode>& schema, const std::shared_ptr<WriterProperties>& properties) { std::unique_ptr<ParquetFileWriter::Contents> result( new FileSerializer(sink, schema, properties)); @@ -249,7 +249,7 @@ void FileSerializer::WriteMetaData() { } FileSerializer::FileSerializer(std::shared_ptr<OutputStream> sink, - std::shared_ptr<GroupNode>& schema, + const std::shared_ptr<GroupNode>& schema, const std::shared_ptr<WriterProperties>& properties) : sink_(sink), allocator_(properties->allocator()), http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/6224b9c5/src/parquet/file/writer-internal.h ---------------------------------------------------------------------- diff --git a/src/parquet/file/writer-internal.h b/src/parquet/file/writer-internal.h index c49a076..29b326f 100644 --- a/src/parquet/file/writer-internal.h +++ b/src/parquet/file/writer-internal.h @@ -111,7 +111,8 @@ class RowGroupSerializer : public RowGroupWriter::Contents { class FileSerializer : public ParquetFileWriter::Contents { public: static std::unique_ptr<ParquetFileWriter::Contents> Open( - std::shared_ptr<OutputStream> sink, std::shared_ptr<schema::GroupNode>& schema, + std::shared_ptr<OutputStream> sink, + const std::shared_ptr<schema::GroupNode>& schema, const std::shared_ptr<WriterProperties>& properties = default_writer_properties()); void Close() override; @@ -128,7 +129,7 @@ class FileSerializer : public ParquetFileWriter::Contents { private: explicit FileSerializer(std::shared_ptr<OutputStream> sink, - std::shared_ptr<schema::GroupNode>& schema, + const std::shared_ptr<schema::GroupNode>& schema, const std::shared_ptr<WriterProperties>& properties); std::shared_ptr<OutputStream> sink_; http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/6224b9c5/src/parquet/file/writer.cc ---------------------------------------------------------------------- diff --git a/src/parquet/file/writer.cc b/src/parquet/file/writer.cc index 84bbe8d..269b1cb 100644 --- a/src/parquet/file/writer.cc +++ b/src/parquet/file/writer.cc @@ -54,7 +54,7 @@ ParquetFileWriter::~ParquetFileWriter() { } std::unique_ptr<ParquetFileWriter> ParquetFileWriter::Open( - std::shared_ptr<OutputStream> sink, std::shared_ptr<GroupNode>& schema, + std::shared_ptr<OutputStream> sink, const std::shared_ptr<GroupNode>& schema, const std::shared_ptr<WriterProperties>& properties) { auto contents = FileSerializer::Open(sink, schema, properties); http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/6224b9c5/src/parquet/file/writer.h ---------------------------------------------------------------------- diff --git a/src/parquet/file/writer.h b/src/parquet/file/writer.h index e213fbe..223c4bb 100644 --- a/src/parquet/file/writer.h +++ b/src/parquet/file/writer.h @@ -105,7 +105,7 @@ class ParquetFileWriter { ~ParquetFileWriter(); static std::unique_ptr<ParquetFileWriter> Open(std::shared_ptr<OutputStream> sink, - std::shared_ptr<schema::GroupNode>& schema, + const std::shared_ptr<schema::GroupNode>& schema, const std::shared_ptr<WriterProperties>& properties = default_writer_properties()); void Open(std::unique_ptr<Contents> contents);
