summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/SConscript
blob: e2f5c372b318b17bf4e29c1bf6cf566599f609a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# -*- mode: python -*-

Import('env')

env = env.Clone()

env.Library(
    target='aggregation',
    source=[
        'aggregation.cpp',
    ],
    LIBDEPS=[
        'aggregation_request',
        'expression_context',
        'pipeline',
    ]
)

env.Library(
    target='field_path',
    source=[
        'field_path.cpp',
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        ]
    )

env.Library(
    target='document_value',
    source=[
        'document.cpp',
        'document_comparator.cpp',
        'document_path_support.cpp',
        'value.cpp',
        'value_comparator.cpp',
        ],
    LIBDEPS=[
        'field_path',
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/query/datetime/date_time_support',
        '$BUILD_DIR/mongo/util/intrusive_counter',
        ]
    )

env.Library(
    target='document_value_test_util',
    source=[
        'document_value_test_util.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/unittest/unittest',
        'document_value',
    ],
)

env.Library(
    target='aggregation_request',
    source=[
        'aggregation_request.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/namespace_string',
        '$BUILD_DIR/mongo/db/query/command_request_response',
        '$BUILD_DIR/mongo/db/query/explain_options',
        '$BUILD_DIR/mongo/db/query/query_request',
        '$BUILD_DIR/mongo/db/repl/read_concern_args',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/mongo/db/write_concern_options',
        'document_sources_idl',
        'document_value',
    ]
)

env.Library(
    target='expression_context',
    source=[
        'expression_context.cpp',
        'variables.cpp',
    ],
    LIBDEPS=[
        'aggregation_request',
        '$BUILD_DIR/mongo/db/query/collation/collator_factory_interface',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/util/intrusive_counter',
    ]
)

env.Library(
    target='dependencies',
    source=[
        'dependencies.cpp',
        ],
    LIBDEPS=[
        'document_value',
        'field_path',
    ]
)

env.Library(
    target='expression',
    source=[
        'expression.cpp',
        'expression_trigonometric.cpp',
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/query/datetime/date_time_support',
        '$BUILD_DIR/mongo/db/server_options_core',
        '$BUILD_DIR/mongo/util/regex_util',
        '$BUILD_DIR/mongo/util/summation',
        'dependencies',
        'document_value',
        'expression_context',
    ]
)

env.Library(
    target='accumulator',
    source=[
        'accumulation_statement.cpp',
        'accumulator_add_to_set.cpp',
        'accumulator_avg.cpp',
        'accumulator_first.cpp',
        'accumulator_last.cpp',
        'accumulator_min_max.cpp',
        'accumulator_push.cpp',
        'accumulator_std_dev.cpp',
        'accumulator_sum.cpp',
        'accumulator_merge_objects.cpp'
        ],
    LIBDEPS=[
        'document_value',
        '$BUILD_DIR/mongo/util/summation',
        'expression',
        'field_path',
    ]
)

env.Library(
    target='granularity_rounder',
    source=[
        'granularity_rounder.cpp',
        'granularity_rounder_powers_of_two.cpp',
        'granularity_rounder_preferred_numbers.cpp',
        ],
    LIBDEPS=[
        'document_value',
        'expression',
        'field_path',
    ]
)

env.Library(
    target='document_source_mock',
    source=[
        'document_source_mock.cpp',
        'stub_mongo_process_interface_lookup_single_document.cpp',
        ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/query/query_test_service_context',
        'pipeline',
    ]
)

env.Library(
    target='sharded_agg_helpers',
    source=[
        'sharded_agg_helpers.cpp',
    ],
    LIBDEPS=[
        'aggregation',
        '$BUILD_DIR/mongo/s/async_requests_sender',
        '$BUILD_DIR/mongo/s/query/cluster_aggregation_planner',
        '$BUILD_DIR/mongo/s/commands/shared_cluster_commands',
    ],
)

env.Library(
    target='lite_parsed_document_source',
    source=[
        'lite_parsed_document_source.cpp',
        'lite_parsed_pipeline.cpp',
        ],
    LIBDEPS=[
        'aggregation_request',
    ]
)

env.Library(
    target='mongo_process_interface',
    source=[
        'mongo_process_interface.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ]
)

env.Library(
    target='mongo_process_common',
    source=[
        'mongo_process_common.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/auth/auth',
        '$BUILD_DIR/mongo/db/generic_cursor',
        '$BUILD_DIR/mongo/s/sharding_router_api',
        'field_path',
    ]
)

env.Library(
    target='process_interface_standalone',
    source=[
        'process_interface_standalone.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/ops/write_ops_exec',
        '$BUILD_DIR/mongo/db/query_exec',
        '$BUILD_DIR/mongo/db/repl/speculative_majority_read_info',
        'mongo_process_common',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/catalog/database_holder',
        '$BUILD_DIR/mongo/db/concurrency/flow_control_ticketholder',
        '$BUILD_DIR/mongo/db/session_catalog',
        '$BUILD_DIR/mongo/db/storage/backup_cursor_hooks',
        '$BUILD_DIR/mongo/db/transaction',
    ],
)

env.Library(
    target='process_interface_shardsvr',
    source=[
        'process_interface_shardsvr.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/transaction',
        '$BUILD_DIR/mongo/db/write_ops',
        '$BUILD_DIR/mongo/s/sharding_api',
        'process_interface_standalone',
        'sharded_agg_helpers',
    ],
)

env.Library(
    target='mongos_process_interface',
    source=[
        'mongos_process_interface.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/pipeline/pipeline',
        '$BUILD_DIR/mongo/s/query/async_results_merger',
        '$BUILD_DIR/mongo/s/query/cluster_aggregation_planner',
        '$BUILD_DIR/mongo/s/query/cluster_query',
        'mongo_process_common',
        'sharded_agg_helpers',
    ]
)

env.Library(
    target="process_interface_factory_mongod",
    source=[
        "process_interface_factory_mongod.cpp",
    ],
    LIBDEPS_PRIVATE=[
        'process_interface_shardsvr',
    ],
)

pipelineeEnv = env.Clone()
pipelineeEnv.InjectThirdParty(libraries=['snappy'])
pipelineeEnv.Library(
    target='pipeline',
    source=[
        'document_source.cpp',
        'document_source_add_fields.cpp',
        'document_source_bucket.cpp',
        'document_source_bucket_auto.cpp',
        'document_source_change_stream.cpp',
        'document_source_change_stream_close_cursor.cpp',
        'document_source_change_stream_transform.cpp',
        'document_source_check_invalidate.cpp',
        'document_source_check_resume_token.cpp',
        'document_source_coll_stats.cpp',
        'document_source_count.cpp',
        'document_source_current_op.cpp',
        'document_source_exchange.cpp',
        'document_source_facet.cpp',
        'document_source_geo_near.cpp',
        'document_source_graph_lookup.cpp',
        'document_source_group.cpp',
        'document_source_index_stats.cpp',
        'document_source_internal_inhibit_optimization.cpp',
        'document_source_internal_shard_filter.cpp',
        'document_source_internal_split_pipeline.cpp',
        'document_source_limit.cpp',
        'document_source_list_cached_and_active_users.cpp',
        'document_source_list_local_sessions.cpp',
        'document_source_list_sessions.cpp',
        'document_source_lookup.cpp',
        'document_source_lookup_change_post_image.cpp',
        'document_source_match.cpp',
        'document_source_merge.cpp',
        'document_source_out.cpp',
        'document_source_plan_cache_stats.cpp',
        'document_source_project.cpp',
        'document_source_queue.cpp',
        'document_source_redact.cpp',
        'document_source_replace_root.cpp',
        'document_source_sample.cpp',
        'document_source_sample_from_random_cursor.cpp',
        'document_source_sequential_document_cache.cpp',
        'document_source_single_document_transformation.cpp',
        'document_source_skip.cpp',
        'document_source_sort.cpp',
        'document_source_sort_by_count.cpp',
        'document_source_tee_consumer.cpp',
        'document_source_unwind.cpp',
        'pipeline.cpp',
        'sequential_document_cache.cpp',
        'stage_constraints.cpp',
        'tee_buffer.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/client/clientdriver_minimal',
        '$BUILD_DIR/mongo/db/auth/auth',
        '$BUILD_DIR/mongo/db/bson/dotted_path_support',
        '$BUILD_DIR/mongo/db/curop',
        '$BUILD_DIR/mongo/db/curop_failpoint_helpers',
        '$BUILD_DIR/mongo/db/generic_cursor',
        '$BUILD_DIR/mongo/db/index/key_generator',
        '$BUILD_DIR/mongo/db/logical_session_cache',
        '$BUILD_DIR/mongo/db/logical_session_id_helpers',
        '$BUILD_DIR/mongo/db/matcher/expressions',
        '$BUILD_DIR/mongo/db/pipeline/lite_parsed_document_source',
        '$BUILD_DIR/mongo/db/query/collation/collator_factory_interface',
        '$BUILD_DIR/mongo/db/query/collation/collator_interface',
        '$BUILD_DIR/mongo/db/repl/oplog_entry',
        '$BUILD_DIR/mongo/db/repl/read_concern_args',
        '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
        '$BUILD_DIR/mongo/db/repl/speculative_majority_read_info',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/db/sessions_collection',
        '$BUILD_DIR/mongo/db/storage/encryption_hooks',
        '$BUILD_DIR/mongo/db/storage/storage_options',
        '$BUILD_DIR/mongo/s/is_mongos',
        '$BUILD_DIR/third_party/shim_snappy',
        'accumulator',
        'dependencies',
        'document_sources_idl',
        'document_value',
        'expression',
        'expression_context',
        'granularity_rounder',
        'parsed_aggregation_projection',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
        '$BUILD_DIR/mongo/rpc/command_status',
    ]
)

env.Library(
    target='parsed_aggregation_projection',
    source=[
        'parsed_aggregation_projection.cpp',
        'parsed_aggregation_projection_node.cpp',
        'parsed_exclusion_projection.cpp',
        'parsed_inclusion_projection.cpp',
        'parsed_add_fields.cpp',
    ],
    LIBDEPS=[
        'expression',
        'field_path',
        '$BUILD_DIR/mongo/db/matcher/expressions',
    ]
)

env.Library(
    target='runtime_constants_idl',
    source=[
        env.Idlc('runtime_constants.idl')[0]
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/idl/idl_parser',
    ],
)

env.Library(
    target='document_sources_idl',
    source=[
        env.Idlc('document_source_change_stream.idl')[0],
        env.Idlc('document_source_list_sessions.idl')[0],
        env.Idlc('document_source_merge.idl')[0],
        env.Idlc('document_source_merge_modes.idl')[0],
        env.Idlc('document_source_replace_root.idl')[0],
        env.Idlc('exchange_spec.idl')[0],
        env.Idlc('value.idl')[0],
        'document_source_merge_spec.cpp',
        'resume_token.cpp'
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/storage/key_string',
        '$BUILD_DIR/mongo/idl/idl_parser',
        '$BUILD_DIR/mongo/s/common_s',
        'document_value',
        'runtime_constants_idl',
    ],
)

env.CppUnitTest(
    target='db_pipeline_test',
    source=[
        'accumulator_test.cpp',
        'aggregation_request_test.cpp',
        'dependencies_test.cpp',
        'document_comparator_test.cpp',
        'document_path_support_test.cpp',
        'document_source_add_fields_test.cpp',
        'document_source_bucket_auto_test.cpp',
        'document_source_bucket_test.cpp',
        'document_source_change_stream_test.cpp',
        'document_source_check_resume_token_test.cpp',
        'document_source_count_test.cpp',
        'document_source_current_op_test.cpp',
        'document_source_exchange_test.cpp',
        'document_source_facet_test.cpp',
        'document_source_geo_near_test.cpp',
        'document_source_graph_lookup_test.cpp',
        'document_source_group_test.cpp',
        'document_source_internal_shard_filter_test.cpp',
        'document_source_internal_split_pipeline_test.cpp',
        'document_source_limit_test.cpp',
        'document_source_lookup_change_post_image_test.cpp',
        'document_source_lookup_test.cpp',
        'document_source_match_test.cpp',
        'document_source_merge_cursors_test.cpp',
        'document_source_merge_test.cpp',
        'document_source_mock_test.cpp',
        'document_source_out_test.cpp',
        'document_source_plan_cache_stats_test.cpp',
        'document_source_project_test.cpp',
        'document_source_redact_test.cpp',
        'document_source_replace_root_test.cpp',
        'document_source_sample_test.cpp',
        'document_source_skip_test.cpp',
        'document_source_sort_by_count_test.cpp',
        'document_source_sort_test.cpp',
        'document_source_test.cpp',
        'document_source_unwind_test.cpp',
        'document_value_test.cpp',
        'document_value_test_util_self_test.cpp',
        'expression_convert_test.cpp',
        'expression_date_test.cpp',
        'expression_test.cpp',
        'expression_trigonometric_test.cpp',
        'expression_walker_test.cpp',
        'field_path_test.cpp',
        'granularity_rounder_powers_of_two_test.cpp',
        'granularity_rounder_preferred_numbers_test.cpp',
        'lookup_set_cache_test.cpp',
        'mongos_process_interface_test.cpp',
        'parsed_add_fields_test.cpp',
        'parsed_aggregation_projection_test.cpp',
        'parsed_exclusion_projection_test.cpp',
        'parsed_inclusion_projection_test.cpp',
        'pipeline_metadata_tree_test.cpp',
        'pipeline_test.cpp',
        'process_interface_standalone_test.cpp',
        'resume_token_test.cpp',
        'sequential_document_cache_test.cpp',
        'tee_buffer_test.cpp',
        'value_comparator_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/auth/authmocks',
        '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
        '$BUILD_DIR/mongo/db/query/query_test_service_context',
        '$BUILD_DIR/mongo/db/repl/oplog_entry',
        '$BUILD_DIR/mongo/db/repl/replmocks',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/db/service_context_test_fixture',
        '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
        '$BUILD_DIR/mongo/s/is_mongos',
        '$BUILD_DIR/mongo/s/query/cluster_aggregate',
        '$BUILD_DIR/mongo/s/query/router_exec_stage',
        '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
        '$BUILD_DIR/mongo/util/clock_source_mock',
        'accumulator',
        'aggregation_request',
        'document_source_mock',
        'document_sources_idl',
        'document_value',
        'document_value_test_util',
        'expression',
        'field_path',
        'granularity_rounder',
        'mongo_process_common',
        'mongo_process_interface',
        'mongos_process_interface',
        'parsed_aggregation_projection',
        'pipeline',
        'process_interface_shardsvr',
        'process_interface_standalone',
    ],
)