diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt index 8a9b8603f9ae4..a2ebbad0f9287 100644 --- a/cpp/src/parquet/CMakeLists.txt +++ b/cpp/src/parquet/CMakeLists.txt @@ -17,7 +17,6 @@ # Headers: top level install(FILES - parquet.h exception.h types.h DESTINATION include/parquet) diff --git a/cpp/src/parquet/api/CMakeLists.txt b/cpp/src/parquet/api/CMakeLists.txt new file mode 100644 index 0000000000000..89151f0fda5f3 --- /dev/null +++ b/cpp/src/parquet/api/CMakeLists.txt @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Headers: public api +install(FILES + io.h + reader.h + schema.h + DESTINATION include/parquet/api) diff --git a/cpp/src/parquet/util/dict-encoding.h b/cpp/src/parquet/api/io.h similarity index 65% rename from cpp/src/parquet/util/dict-encoding.h rename to cpp/src/parquet/api/io.h index 315b88ee91ea6..a8e555de5b6b6 100644 --- a/cpp/src/parquet/util/dict-encoding.h +++ b/cpp/src/parquet/api/io.h @@ -15,22 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef PARQUET_UTIL_DICT_ENCODING_H -#define PARQUET_UTIL_DICT_ENCODING_H +#ifndef PARQUET_API_IO_H +#define PARQUET_API_IO_H -#include -#include -#include -#include +#include "parquet/exception.h" +#include "parquet/util/buffer.h" +#include "parquet/util/input.h" +#include "parquet/util/output.h" -#include "parquet/types.h" -#include "parquet/encodings/plain-encoding.h" -#include "parquet/util/hash-util.h" -#include "parquet/util/mem-pool.h" -#include "parquet/util/rle-encoding.h" - -namespace parquet_cpp { - -} // namespace parquet_cpp - -#endif // PARQUET_UTIL_DICT_ENCODING_H +#endif // PARQUET_API_IO_H diff --git a/cpp/src/parquet/parquet.h b/cpp/src/parquet/api/reader.h similarity index 70% rename from cpp/src/parquet/parquet.h rename to cpp/src/parquet/api/reader.h index ea8ab5ee0f51e..41cb06b3af967 100644 --- a/cpp/src/parquet/parquet.h +++ b/cpp/src/parquet/api/reader.h @@ -15,32 +15,18 @@ // specific language governing permissions and limitations // under the License. -#ifndef PARQUET_PARQUET_H -#define PARQUET_PARQUET_H - -#include -#include -#include -#include -#include -#include -#include - -#include "parquet/exception.h" +#ifndef PARQUET_API_READER_H +#define PARQUET_API_READER_H // Column reader API #include "parquet/column/reader.h" - -// File API +#include "parquet/exception.h" #include "parquet/file/reader.h" // Schemas -#include "parquet/schema/descriptor.h" -#include "parquet/schema/printer.h" -#include "parquet/schema/types.h" +#include "parquet/api/schema.h" // IO -#include "parquet/util/input.h" -#include "parquet/util/output.h" +#include "parquet/api/io.h" -#endif +#endif // PARQUET_API_READER_H diff --git a/cpp/src/parquet/api/schema.h b/cpp/src/parquet/api/schema.h new file mode 100644 index 0000000000000..aca6c99a5004d --- /dev/null +++ b/cpp/src/parquet/api/schema.h @@ -0,0 +1,26 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#ifndef PARQUET_API_SCHEMA_H +#define PARQUET_API_SCHEMA_H + +// Schemas +#include "parquet/schema/descriptor.h" +#include "parquet/schema/printer.h" +#include "parquet/schema/types.h" + +#endif // PARQUET_API_SCHEMA_H diff --git a/cpp/src/parquet/encodings/dictionary-encoding.h b/cpp/src/parquet/encodings/dictionary-encoding.h index 93780a13830c1..43669b73e7685 100644 --- a/cpp/src/parquet/encodings/dictionary-encoding.h +++ b/cpp/src/parquet/encodings/dictionary-encoding.h @@ -28,7 +28,6 @@ #include "parquet/encodings/encoder.h" #include "parquet/encodings/plain-encoding.h" #include "parquet/util/cpu-info.h" -#include "parquet/util/dict-encoding.h" #include "parquet/util/hash-util.h" #include "parquet/util/mem-pool.h" #include "parquet/util/rle-encoding.h" diff --git a/cpp/src/parquet/encodings/encoding-test.cc b/cpp/src/parquet/encodings/encoding-test.cc index e74f4ff6b580b..490047c1d7d85 100644 --- a/cpp/src/parquet/encodings/encoding-test.cc +++ b/cpp/src/parquet/encodings/encoding-test.cc @@ -29,7 +29,6 @@ #include "parquet/schema/types.h" #include "parquet/util/bit-util.h" #include "parquet/util/buffer.h" -#include "parquet/util/dict-encoding.h" #include "parquet/util/output.h" #include "parquet/util/test-common.h" diff --git a/cpp/src/parquet/public-api-test.cc b/cpp/src/parquet/public-api-test.cc index 41037146a857d..951c13ed8ecd1 100644 --- a/cpp/src/parquet/public-api-test.cc +++ b/cpp/src/parquet/public-api-test.cc @@ -16,7 +16,10 @@ // under the License. #include -#include "parquet/parquet.h" + +#include "parquet/api/io.h" +#include "parquet/api/reader.h" +#include "parquet/api/schema.h" namespace parquet_cpp { diff --git a/cpp/src/parquet/util/CMakeLists.txt b/cpp/src/parquet/util/CMakeLists.txt index c8d2c2fa3d2be..5cb7b2fa83f5c 100644 --- a/cpp/src/parquet/util/CMakeLists.txt +++ b/cpp/src/parquet/util/CMakeLists.txt @@ -20,10 +20,10 @@ install(FILES bit-stream-utils.h bit-stream-utils.inline.h bit-util.h + buffer.h buffer-builder.h compiler-util.h cpu-info.h - dict-encoding.h hash-util.h input.h logging.h @@ -32,7 +32,7 @@ install(FILES output.h rle-encoding.h stopwatch.h - sse-info.h + sse-util.h DESTINATION include/parquet/util) add_library(parquet_util STATIC