Skip to content

Commit dc09722

Browse files
authored
GH-46153: [C++] Implement acero directory in Meson (#46154)
### Rationale for this change Improves coverage of the Meson build system configuration ### What changes are included in this PR? This adds the Acero directory to Meson ### Are these changes tested? Yes ### Are there any user-facing changes? No * GitHub Issue: #46153 Authored-by: Will Ayd <william.ayd@icloud.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent f25fab4 commit dc09722

File tree

4 files changed

+146
-1
lines changed

4 files changed

+146
-1
lines changed

cpp/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ needs_s3 = get_option('s3').enabled()
6666
needs_filesystem = get_option('filesystem').enabled() or needs_azure or needs_gcs or needs_hdfs or needs_s3
6767
needs_integration = get_option('integration').enabled()
6868
needs_tests = get_option('tests').enabled()
69-
needs_ipc = get_option('ipc').enabled() or needs_tests or needs_benchmarks
69+
needs_acero = get_option('acero').enabled()
70+
needs_ipc = get_option('ipc').enabled() or needs_tests or needs_acero or needs_benchmarks
7071
needs_testing = get_option('testing').enabled() or needs_tests or needs_benchmarks or needs_integration
7172
needs_json = get_option('json').enabled() or needs_testing
7273

cpp/meson.options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
option('acero', type: 'feature', description: 'Build the Arrow Acero Engine Module')
1819
option(
1920
'azure',
2021
type: 'feature',

cpp/src/arrow/acero/meson.build

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
install_headers(
19+
[
20+
'accumulation_queue.h',
21+
'aggregate_node.h',
22+
'api.h',
23+
'asof_join_node.h',
24+
'backpressure_handler.h',
25+
'benchmark_util.h',
26+
'bloom_filter.h',
27+
'exec_plan.h',
28+
'hash_join_dict.h',
29+
'hash_join.h',
30+
'hash_join_node.h',
31+
'map_node.h',
32+
'options.h',
33+
'order_by_impl.h',
34+
'partition_util.h',
35+
'query_context.h',
36+
'schema_util.h',
37+
'task_util.h',
38+
'test_nodes.h',
39+
'time_series_util.h',
40+
'tpch_node.h',
41+
'type_fwd.h',
42+
'util.h',
43+
'visibility.h',
44+
],
45+
subdir: 'arrow/acero',
46+
)
47+
48+
arrow_acero_srcs = [
49+
'accumulation_queue.cc',
50+
'scalar_aggregate_node.cc',
51+
'groupby_aggregate_node.cc',
52+
'aggregate_internal.cc',
53+
'asof_join_node.cc',
54+
'bloom_filter.cc',
55+
'exec_plan.cc',
56+
'fetch_node.cc',
57+
'filter_node.cc',
58+
'hash_join.cc',
59+
'hash_join_dict.cc',
60+
'hash_join_node.cc',
61+
'map_node.cc',
62+
'options.cc',
63+
'order_by_node.cc',
64+
'order_by_impl.cc',
65+
'partition_util.cc',
66+
'pivot_longer_node.cc',
67+
'project_node.cc',
68+
'query_context.cc',
69+
'sink_node.cc',
70+
'sorted_merge_node.cc',
71+
'source_node.cc',
72+
'swiss_join.cc',
73+
'task_util.cc',
74+
'time_series_util.cc',
75+
'tpch_node.cc',
76+
'union_node.cc',
77+
'util.cc',
78+
]
79+
80+
arrow_acero_lib = library(
81+
'arrow-acero',
82+
sources: arrow_acero_srcs,
83+
dependencies: [arrow_dep],
84+
)
85+
86+
arrow_acero_dep = declare_dependency(link_with: [arrow_acero_lib])
87+
88+
arrow_acero_testing_sources = ['test_nodes.cc', 'test_util_internal.cc'] + arrow_compute_testing_srcs
89+
90+
arrow_acero_tests = {
91+
'plan-test': {'sources': ['plan_test.cc', 'test_nodes_test.cc']},
92+
'source-node-test': {'sources': ['source_node_test.cc']},
93+
'fetch-node-test': {'sources': ['fetch_node_test.cc']},
94+
'order-by-node-test': {'sources': ['order_by_node_test.cc']},
95+
'hash-join-node-test': {
96+
'sources': ['hash_join_node_test.cc', 'bloom_filter_test.cc'],
97+
},
98+
'pivot-longer-node-test': {'sources': ['pivot_longer_node_test.cc']},
99+
'asof-join-node-test': {'sources': ['asof_join_node_test.cc']},
100+
'sorted-merge-node-test': {'sources': ['sorted_merge_node_test.cc']},
101+
'tpch-node-test': {'sources': ['tpch_node_test.cc']},
102+
'union-node-test': {'sources': ['union_node_test.cc']},
103+
'aggregate-node-test': {'sources': ['aggregate_node_test.cc']},
104+
'util-test': {'sources': ['util_test.cc', 'task_util_test.cc']},
105+
'hash-aggregate-test': {'sources': ['hash_aggregate_test.cc']},
106+
'test-util-internal-test': {'sources': ['test_util_internal_test.cc']},
107+
}
108+
109+
foreach key, val : arrow_acero_tests
110+
exc = executable(
111+
'arrow-acero-@0@'.format(key),
112+
sources: val['sources'] + arrow_acero_testing_sources,
113+
dependencies: [arrow_acero_dep, arrow_test_dep],
114+
)
115+
test(key, exc)
116+
endforeach
117+
118+
arrow_acero_benchmarks = {
119+
'expression-benchmark': {'sources': ['expression_benchmark.cc']},
120+
'filter-benchmark': {
121+
'sources': ['benchmark_util.cc', 'filter_benchmark.cc'],
122+
},
123+
'project-benchmark': {
124+
'sources': ['benchmark_util.cc', 'project_benchmark.cc'],
125+
},
126+
'asof-join-benchmark': {'sources': ['asof_join_benchmark.cc']},
127+
'tpch-benchmark': {'sources': ['tpch_benchmark.cc']},
128+
'aggregate-benchmark': {'sources': ['aggregate_benchmark.cc']},
129+
'hash-join-benchmark': {'sources': ['hash_join_benchmark.cc']},
130+
}
131+
132+
foreach key, val : arrow_acero_benchmarks
133+
exc = executable(
134+
key,
135+
sources: val['sources'] + arrow_acero_testing_sources,
136+
dependencies: [arrow_acero_dep, arrow_benchmark_dep, gmock_dep],
137+
)
138+
benchmark(key, exc)
139+
endforeach

cpp/src/arrow/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,10 @@ if needs_csv
674674
subdir('csv')
675675
endif
676676

677+
if needs_acero
678+
subdir('acero')
679+
endif
680+
677681
if needs_filesystem
678682
subdir('filesystem')
679683
endif

0 commit comments

Comments
 (0)