This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 05e64889fa GH-46410: [C++] Add parquet options to Meson configuration 
(#46647)
05e64889fa is described below

commit 05e64889fac700eda737e6fb7410382f0ae7219d
Author: William Ayd <[email protected]>
AuthorDate: Thu Sep 11 20:40:42 2025 -0400

    GH-46410: [C++] Add parquet options to Meson configuration (#46647)
    
    ### Rationale for this change
    
    This continues adding functionality to the Meson configuration
    
    ### What changes are included in this PR?
    
    This adds the parquet directory to the Meson configuration
    
    ### Are these changes tested?
    
    Yes
    
    ### Are there any user-facing changes?
    
    No
    * GitHub Issue: #46410
    
    Authored-by: Will Ayd <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/examples/parquet/meson.build       |  57 ++++++
 cpp/meson.build                        |  35 +++-
 cpp/meson.options                      |  16 ++
 cpp/src/arrow/ipc/meson.build          |   8 -
 cpp/src/arrow/meson.build              |   5 +-
 cpp/src/arrow/util/meson.build         |   4 +-
 cpp/src/parquet/api/meson.build        |  21 +++
 cpp/src/parquet/arrow/meson.build      |  31 ++++
 cpp/src/parquet/encryption/meson.build |  39 ++++
 cpp/src/parquet/geospatial/meson.build |  18 ++
 cpp/src/parquet/meson.build            | 314 +++++++++++++++++++++++++++++++++
 cpp/subprojects/openssl.wrap           |  32 ++++
 cpp/subprojects/thrift.wrap            |  23 +++
 cpp/tools/parquet/meson.build          |  35 ++++
 14 files changed, 625 insertions(+), 13 deletions(-)

diff --git a/cpp/examples/parquet/meson.build b/cpp/examples/parquet/meson.build
new file mode 100644
index 0000000000..96e2711f32
--- /dev/null
+++ b/cpp/examples/parquet/meson.build
@@ -0,0 +1,57 @@
+# 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.
+
+example_execs = {
+    'parquet-low-level-example': {
+        'sources': files('low_level_api/reader_writer.cc'),
+        'include_dir': include_directories('low_level_api'),
+    },
+    'parquet-low-level-example2': {
+        'sources': files('low_level_api/reader_writer2.cc'),
+        'include_dir': include_directories('low_level_api'),
+    },
+    'parquet-arrow-example': {
+        'sources': files('parquet_arrow/reader_writer.cc'),
+    },
+    'parquet-stream-api-example': {
+        'sources': files('parquet_stream_api/stream_reader_writer.cc'),
+    },
+}
+
+if needs_parquet_encryption
+    example_execs += {
+        'parquet-encryption-example': {
+            'sources': files('low_level_api/encryption_reader_writer.cc'),
+            'include_dir': include_directories('low_level_api'),
+        },
+        'parquet-encryption-example-all-crypto-options': {
+            'sources': files(
+                'low_level_api/encryption_reader_writer_all_crypto_options.cc',
+            ),
+            'include_dir': include_directories('low_level_api'),
+        },
+    }
+endif
+
+foreach key, val : example_execs
+    executable(
+        key,
+        sources: val['sources'],
+        include_directories: val.get('include_dir', []),
+        dependencies: [arrow_dep, parquet_dep],
+    )
+endforeach
diff --git a/cpp/meson.build b/cpp/meson.build
index 5309db01ce..81143ed1e2 100644
--- a/cpp/meson.build
+++ b/cpp/meson.build
@@ -57,14 +57,37 @@ needs_csv = get_option('csv').enabled()
 needs_azure = get_option('azure').enabled()
 needs_gcs = get_option('gcs').enabled()
 needs_hdfs = get_option('hdfs').enabled()
+needs_parquet = get_option('parquet').enabled()
+needs_parquet_encryption = get_option('parquet_require_encryption').enabled()
 needs_s3 = get_option('s3').enabled()
-needs_filesystem = get_option('filesystem').enabled() or needs_azure or 
needs_gcs or needs_hdfs or needs_s3
+needs_filesystem = (get_option('filesystem').enabled()
+    or needs_azure
+    or needs_gcs
+    or needs_hdfs
+    or needs_parquet_encryption
+    or needs_s3
+)
 needs_integration = get_option('integration').enabled()
 needs_tests = get_option('tests').enabled()
 needs_acero = get_option('acero').enabled()
 needs_flight = get_option('flight').enabled()
-needs_ipc = get_option('ipc').enabled() or needs_tests or needs_acero or 
needs_benchmarks or needs_flight
+needs_ipc = (get_option('ipc').enabled()
+    or needs_tests
+    or needs_acero
+    or needs_benchmarks
+    or needs_flight
+    or needs_parquet
+)
+
 needs_fuzzing = get_option('fuzzing').enabled()
+if needs_fuzzing
+    if meson.version() < '1.8.0'
+        error(
+            f'Meson >= 1.8.0 is required for fuzzing support, found 
@meson.version()@',
+        )
+    endif
+endif
+
 needs_testing = (get_option('testing').enabled()
     or needs_tests
     or needs_benchmarks
@@ -81,3 +104,11 @@ needs_zstd = get_option('zstd').enabled()
 needs_utilities = get_option('utilities').enabled()
 
 subdir('src/arrow')
+
+if needs_parquet
+    subdir('src/parquet')
+    subdir('tools/parquet')
+    if get_option('parquet_build_examples').enabled()
+        subdir('examples/parquet')
+    endif
+endif
diff --git a/cpp/meson.options b/cpp/meson.options
index e423884b84..668f440ee7 100644
--- a/cpp/meson.options
+++ b/cpp/meson.options
@@ -89,6 +89,22 @@ option(
     type: 'string',
     description: 'Arbitrary string that identifies the kind of package (for 
informational purposes)',
 )
+option('parquet', type: 'feature', description: 'Build the Parquet libraries')
+option(
+    'parquet_build_executables',
+    type: 'feature',
+    description: 'Build the Parquet executable CLI tools.',
+)
+option(
+    'parquet_build_examples',
+    type: 'feature',
+    description: 'Build the Parquet examples.',
+)
+option(
+    'parquet_require_encryption',
+    type: 'feature',
+    description: 'Build support for encryption. Fail if OpenSSL is not found',
+)
 
 option('snappy', type: 'feature', description: 'Build with snappy compression')
 option(
diff --git a/cpp/src/arrow/ipc/meson.build b/cpp/src/arrow/ipc/meson.build
index f6a477e0ab..78a346eefe 100644
--- a/cpp/src/arrow/ipc/meson.build
+++ b/cpp/src/arrow/ipc/meson.build
@@ -94,14 +94,6 @@ endif
 ipc_fuzz_targets = ['file_fuzz', 'stream_fuzz', 'tensor_stream_fuzz']
 
 if needs_fuzzing
-    if meson.version() < '1.8.0'
-        error(
-            ' Meson >= 1.8.0 is required for fuzzing support, found 
@0@'.format(
-                meson.version(),
-            ),
-        )
-    endif
-
     foreach ipc_fuzz_target : ipc_fuzz_targets
         target_name = 'arrow-ipc-@0@'.format(ipc_fuzz_target.replace('_', '-'))
         executable(
diff --git a/cpp/src/arrow/meson.build b/cpp/src/arrow/meson.build
index 2792dfe639..a04fdf88c2 100644
--- a/cpp/src/arrow/meson.build
+++ b/cpp/src/arrow/meson.build
@@ -175,6 +175,7 @@ arrow_util_srcs = [
     'util/bitmap_ops.cc',
     'util/bpacking.cc',
     'util/byte_size.cc',
+    'util/byte_stream_split_internal.cc',
     'util/cancel.cc',
     'util/compression.cc',
     'util/counting_semaphore.cc',
@@ -199,6 +200,7 @@ arrow_util_srcs = [
     'util/memory.cc',
     'util/mutex.cc',
     'util/ree_util.cc',
+    'util/secure_string.cc',
     'util/string.cc',
     'util/string_util.cc',
     'util/task_group.cc',
@@ -486,7 +488,8 @@ arrow_lib = library(
     include_directories: arrow_includes,
     dependencies: arrow_deps,
     install: true,
-    gnu_symbol_visibility: 'inlineshidden',
+    # TODO: re-enable symbol visibility
+    #gnu_symbol_visibility: 'inlineshidden',
     cpp_shared_args: ['-DARROW_EXPORTING'],
 )
 
diff --git a/cpp/src/arrow/util/meson.build b/cpp/src/arrow/util/meson.build
index 99217a28da..2fbbedbb93 100644
--- a/cpp/src/arrow/util/meson.build
+++ b/cpp/src/arrow/util/meson.build
@@ -50,7 +50,7 @@ conf_data.set('ARROW_JEMALLOC_VENDORED', false)
 conf_data.set('ARROW_JSON', needs_json)
 conf_data.set('ARROW_MIMALLOC', false)
 conf_data.set('ARROW_ORC', false)
-conf_data.set('ARROW_PARQUET', false)
+conf_data.set('ARROW_PARQUET', needs_parquet)
 conf_data.set('ARROW_SUBSTRAIT', false)
 conf_data.set('ARROW_AZURE', false)
 conf_data.set('ARROW_ENABLE_THREADING', true)
@@ -73,7 +73,7 @@ conf_data.set('ARROW_WITH_UCX', false)
 conf_data.set('ARROW_WITH_UTF8PROC', false)
 conf_data.set('ARROW_WITH_ZLIB', needs_zlib)
 conf_data.set('ARROW_WITH_ZSTD', needs_zstd)
-conf_data.set('PARQUET_REQUIRE_ENCRYPTION', false)
+conf_data.set('PARQUET_REQUIRE_ENCRYPTION', needs_parquet_encryption)
 
 configure_file(
     input: 'config.h.cmake',
diff --git a/cpp/src/parquet/api/meson.build b/cpp/src/parquet/api/meson.build
new file mode 100644
index 0000000000..48aa80fe2d
--- /dev/null
+++ b/cpp/src/parquet/api/meson.build
@@ -0,0 +1,21 @@
+# 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.
+
+install_headers(
+    ['io.h', 'reader.h', 'schema.h', 'writer.h'],
+    subdir: 'parquet/api',
+)
diff --git a/cpp/src/parquet/arrow/meson.build 
b/cpp/src/parquet/arrow/meson.build
new file mode 100644
index 0000000000..471f2a852b
--- /dev/null
+++ b/cpp/src/parquet/arrow/meson.build
@@ -0,0 +1,31 @@
+# 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.
+
+install_headers(
+    ['reader.h', 'schema.h', 'test_util.h', 'writer.h'],
+    subdir: 'parquet/arrow',
+)
+
+if needs_fuzzing
+    executable(
+        'parquet-arrow-generate-fuzz-corpus',
+        sources: ['generate_fuzz_corpus.cc'],
+        dependencies: [arrow_parquet_dep, arrow_test_dep],
+    )
+
+    exeuctable('parquet-arrow-fuzz', sources: ['fuzz.cc'])
+endif
diff --git a/cpp/src/parquet/encryption/meson.build 
b/cpp/src/parquet/encryption/meson.build
new file mode 100644
index 0000000000..cfa5f35027
--- /dev/null
+++ b/cpp/src/parquet/encryption/meson.build
@@ -0,0 +1,39 @@
+# 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.
+
+install_headers(
+    [
+        'crypto_factory.h',
+        'encryption.h',
+        'file_key_material_store.h',
+        'file_key_unwrapper.h',
+        'file_key_wrapper.h',
+        'file_system_key_material_store.h',
+        'key_encryption_key.h',
+        'key_material.h',
+        'key_metadata.h',
+        'key_toolkit.h',
+        'kms_client_factory.h',
+        'kms_client.h',
+        'local_wrap_kms_client.h',
+        'test_encryption_util.h',
+        'test_in_memory_kms.h',
+        'two_level_cache_with_expiration.h',
+        'type_fwd.h',
+    ],
+    subdir: 'parquet/encryption',
+)
diff --git a/cpp/src/parquet/geospatial/meson.build 
b/cpp/src/parquet/geospatial/meson.build
new file mode 100644
index 0000000000..5f90d72a31
--- /dev/null
+++ b/cpp/src/parquet/geospatial/meson.build
@@ -0,0 +1,18 @@
+# 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.
+
+install_headers(['statistics.h'], subdir: 'parquet/geospatial')
diff --git a/cpp/src/parquet/meson.build b/cpp/src/parquet/meson.build
new file mode 100644
index 0000000000..d7878c2518
--- /dev/null
+++ b/cpp/src/parquet/meson.build
@@ -0,0 +1,314 @@
+# 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.
+
+parquet_srcs = files(
+    '../generated/parquet_types.cpp',
+    'arrow/path_internal.cc',
+    'arrow/reader.cc',
+    'arrow/reader_internal.cc',
+    'arrow/schema.cc',
+    'arrow/schema_internal.cc',
+    'arrow/variant_internal.cc',
+    'arrow/writer.cc',
+    'bloom_filter.cc',
+    'bloom_filter_reader.cc',
+    'chunker_internal.cc',
+    'column_reader.cc',
+    'column_scanner.cc',
+    'column_writer.cc',
+    'decoder.cc',
+    'encoder.cc',
+    'encryption/encryption.cc',
+    'encryption/internal_file_decryptor.cc',
+    'encryption/internal_file_encryptor.cc',
+    'exception.cc',
+    'file_reader.cc',
+    'file_writer.cc',
+    'geospatial/statistics.cc',
+    'geospatial/util_internal.cc',
+    'geospatial/util_json_internal.cc',
+    'level_comparison.cc',
+    'level_conversion.cc',
+    'metadata.cc',
+    'page_index.cc',
+    'platform.cc',
+    'printer.cc',
+    'properties.cc',
+    'schema.cc',
+    'size_statistics.cc',
+    'statistics.cc',
+    'stream_reader.cc',
+    'stream_writer.cc',
+    'types.cc',
+    'xxhasher.cc',
+)
+
+thrift_dep = dependency('thrift', allow_fallback: false, required: false)
+if not thrift_dep.found()
+    cmake = import('cmake')
+    thrift_opts = cmake.subproject_options()
+    thrift_opts.add_cmake_defines(
+        {
+            'BUILD_COMPILER': 'OFF',
+            'BUILD_EXAMPLES': 'OFF',
+            'BUILD_TUTORIALS': 'OFF',
+            'CMAKE_UNITY_BUILD': 'OFF',
+            'WITH_AS3': 'OFF',
+            'WITH_CPP': 'ON',
+            'WITH_C_GLIB': 'OFF',
+            'WITH_JAVA': 'OFF',
+            'WITH_JAVASCRIPT': 'OFF',
+            'WITH_LIBEVENT': 'OFF',
+            'WITH_NODEJS': 'OFF',
+            'WITH_PYTHON': 'OFF',
+            'WITH_QT5': 'OFF',
+            'WITH_ZLIB': 'OFF',
+            'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
+            'CMAKE_POLICY_VERSION_MINIMUM': '3.5',
+            # dummy value to avoid 
https://github.com/mesonbuild/meson/issues/13390
+            'THRIFT_COMPILER': 'foo',
+        },
+    )
+    thrift_proj = cmake.subproject('thrift', options: thrift_opts)
+    thrift_dep = thrift_proj.dependency('thrift')
+endif
+
+parquet_deps = [arrow_dep, rapidjson_dep, thrift_dep]
+
+if needs_parquet_encryption or get_option('parquet_require_encryption') == 
'auto'
+    openssl_dep = dependency('openssl', required: needs_parquet_encryption)
+else
+    openssl_dep = disabler()
+endif
+
+if openssl_dep.found()
+    parquet_deps += openssl_dep
+
+    parquet_srcs += files(
+        'encryption/crypto_factory.cc',
+        'encryption/encryption_internal.cc',
+        'encryption/file_key_unwrapper.cc',
+        'encryption/file_key_wrapper.cc',
+        'encryption/file_system_key_material_store.cc',
+        'encryption/key_material.cc',
+        'encryption/key_metadata.cc',
+        'encryption/key_toolkit.cc',
+        'encryption/key_toolkit_internal.cc',
+        'encryption/kms_client.cc',
+        'encryption/local_wrap_kms_client.cc',
+        'encryption/openssl_internal.cc',
+    )
+else
+    parquet_srcs += files('encryption/encryption_internal_nossl.cc')
+endif
+
+parquet_lib = library(
+    'arrow-parquet',
+    sources: parquet_srcs,
+    dependencies: parquet_deps,
+    # TODO: enable hidden visibility by default
+    #gnu_symbol_visibility: 'inlineshidden',
+)
+
+parquet_dep = declare_dependency(link_with: parquet_lib)
+
+subdir('api')
+subdir('arrow')
+subdir('encryption')
+subdir('geospatial')
+
+install_headers(
+    [
+        'benchmark_util.h',
+        'bloom_filter.h',
+        'bloom_filter_reader.h',
+        'column_page.h',
+        'column_reader.h',
+        'column_scanner.h',
+        'column_writer.h',
+        'encoding.h',
+        'exception.h',
+        'file_reader.h',
+        'file_writer.h',
+        'hasher.h',
+        'level_comparison.h',
+        'level_comparison_inc.h',
+        'level_conversion.h',
+        'level_conversion_inc.h',
+        'metadata.h',
+        'page_index.h',
+        'platform.h',
+        'printer.h',
+        'properties.h',
+        'schema.h',
+        'size_statistics.h',
+        'statistics.h',
+        'stream_reader.h',
+        'stream_writer.h',
+        'test_util.h',
+        'type_fwd.h',
+        'types.h',
+        'windows_compatibility.h',
+        'windows_fixup.h',
+        'xxhasher.h',
+    ],
+    subdir: 'parquet',
+)
+
+conf_data = configuration_data()
+
+conf_data.set('ARROW_VERSION_MAJOR', version_major)
+conf_data.set('ARROW_VERSION_MINOR', version_minor)
+conf_data.set('ARROW_VERSION_PATCH', version_patch)
+
+conf_data.set('ARROW_VERSION', arrow_version)
+
+conf_data.set('ARROW_SO_VERSION', arrow_so_version)
+conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version)
+
+configure_file(
+    input: 'parquet_version.h.in',
+    output: 'parquet_version.h',
+    configuration: conf_data,
+    install: true,
+    install_dir: 'parquet',
+)
+
+parquet_tests = {
+    'internals-test': {
+        'sources': files(
+            'bloom_filter_reader_test.cc',
+            'bloom_filter_test.cc',
+            'encoding_test.cc',
+            'geospatial/statistics_test.cc',
+            'geospatial/util_internal_test.cc',
+            'metadata_test.cc',
+            'page_index_test.cc',
+            'properties_test.cc',
+            'public_api_test.cc',
+            'size_statistics_test.cc',
+            'statistics_test.cc',
+            'types_test.cc',
+        ),
+    },
+    'reader-test': {
+        'sources': files(
+            'column_reader_test.cc',
+            'column_scanner_test.cc',
+            'level_conversion_test.cc',
+            'reader_test.cc',
+            'stream_reader_test.cc',
+        ),
+    },
+    'writer-test': {
+        'sources': files(
+            'column_writer_test.cc',
+            'file_serialize_test.cc',
+            'stream_writer_test.cc',
+        ),
+    },
+    'chunker-test': {'sources': files('chunker_internal_test.cc')},
+    'arrow-reader-writer-test': {
+        'sources': files(
+            'arrow/arrow_reader_writer_test.cc',
+            'arrow/arrow_statistics_test.cc',
+            'arrow/variant_test.cc',
+        ),
+    },
+    'arrow-internals-test': {
+        'sources': files(
+            'arrow/path_internal_test.cc',
+            'arrow/reconstruct_internal_test.cc',
+        ),
+    },
+    'arrow-metadata-test': {
+        'sources': files(
+            'arrow/arrow_metadata_test.cc',
+            'arrow/arrow_schema_test.cc',
+        ),
+    },
+    'file_deserialize_test': {'sources': files('file_deserialize_test.cc')},
+    'schema_test': {'sources': files('schema_test.cc')},
+}
+
+if needs_parquet_encryption
+    parquet_tests += {
+        'encryption-test': {
+            'sources': files(
+                'encryption/encryption_internal_test.cc',
+                'encryption/properties_test.cc',
+                'encryption/read_configurations_test.cc',
+                'encryption/test_encryption_util.cc',
+                'encryption/write_configurations_test.cc',
+            ),
+        },
+        'encryption-key-management-test': {
+            'sources': files(
+                'encryption/key_management_test.cc',
+                'encryption/key_metadata_test.cc',
+                'encryption/key_wrapping_test.cc',
+                'encryption/test_encryption_util.cc',
+                'encryption/test_in_memory_kms.cc',
+                'encryption/two_level_cache_with_expiration_test.cc',
+            ),
+        },
+    }
+endif
+
+parquet_test_dep = [parquet_dep, arrow_test_dep, thrift_dep]
+
+foreach key, val : parquet_tests
+    test_name = 'parquet-@0@'.format(key)
+    exc = executable(
+        test_name,
+        sources: val['sources'] + files('test_util.cc'),
+        dependencies: parquet_test_dep,
+    )
+    test(test_name, exc)
+endforeach
+
+parquet_benchmarks = {
+    'bloom_filter_benchmark': {
+        'sources': files('benchmark_util.cc', 'bloom_filter_benchmark.cc'),
+    },
+    'column_reader_benchmark': {'sources': 
files('column_reader_benchmark.cc')},
+    'column_io_benchmark': {'sources': files('column_io_benchmark.cc')},
+    'encoding_benchmark': {'sources': files('encoding_benchmark.cc')},
+    'level_conversion_benchmark': {
+        'sources': files('level_conversion_benchmark.cc'),
+    },
+    'metadata_benchmark': {'sources': files('metadata_benchmark.cc')},
+    'page_index_benchmark': {
+        'sources': files('benchmark_util.cc', 'page_index_benchmark.cc'),
+    },
+    'reader_writer_benchmark': {
+        'sources': files('arrow/reader_writer_benchmark.cc'),
+    },
+    'size_stats_benchmark': {'sources': 
files('arrow/size_stats_benchmark.cc')},
+}
+
+parquet_benchmark_dep = [parquet_dep, arrow_benchmark_dep, thrift_dep]
+
+foreach key, val : parquet_benchmarks
+    benchmark_name = 'parquet-@0@'.format(key)
+    exc = executable(
+        benchmark_name,
+        sources: val['sources'],
+        dependencies: parquet_benchmark_dep,
+    )
+    benchmark(benchmark_name, exc)
+endforeach
diff --git a/cpp/subprojects/openssl.wrap b/cpp/subprojects/openssl.wrap
new file mode 100644
index 0000000000..57ea0bcc8e
--- /dev/null
+++ b/cpp/subprojects/openssl.wrap
@@ -0,0 +1,32 @@
+# 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.
+
+[wrap-file]
+directory = openssl-3.0.8
+source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz
+source_filename = openssl-3.0.8.tar.gz
+source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e
+patch_filename = openssl_3.0.8-3_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch
+patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963
+source_fallback_url = 
https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz
+wrapdb_version = 3.0.8-3
+
+[provide]
+libcrypto = libcrypto_dep
+libssl = libssl_dep
+openssl = openssl_dep
diff --git a/cpp/subprojects/thrift.wrap b/cpp/subprojects/thrift.wrap
new file mode 100644
index 0000000000..3391a8700b
--- /dev/null
+++ b/cpp/subprojects/thrift.wrap
@@ -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.
+
+[wrap-file]
+source_url = https://github.com/apache/thrift/archive/refs/tags/v0.20.0.tar.gz
+source_filename = thrift-0.20.0.tar.gz
+source_hash = cd7b829d3d9d87f9f7d708e004eef7629789591ee1d416f4741913bc33e5c27d
+directory = thrift-0.20.0
+method = cmake
diff --git a/cpp/tools/parquet/meson.build b/cpp/tools/parquet/meson.build
new file mode 100644
index 0000000000..6650d68ad3
--- /dev/null
+++ b/cpp/tools/parquet/meson.build
@@ -0,0 +1,35 @@
+# 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.
+
+if get_option('parquet_build_executables').enabled()
+    parquet_tools = [
+        'parquet-dump-arrow-statistics',
+        'parquet-dump-footer',
+        'parquet-dump-schema',
+        'parquet-reader',
+        'parquet-scan',
+    ]
+
+    foreach tool : parquet_tools
+        executable(
+            tool,
+            sources: '@[email protected]'.format(tool.replace('-', '_')),
+            dependencies: [arrow_dep, parquet_dep],
+            install: true,
+        )
+    endforeach
+endif

Reply via email to