summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/optimizer/SConscript
blob: 3791d2bdd0e970a00d6c12d18f2f66478ae22683 (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
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.SConscript(
    dirs=[
        "algebra",
    ],
    exports=[
        'env',
    ],
)

env.Library(
    target="optimizer",
    source=[
        "cascades/ce_heuristic.cpp",
        "cascades/ce_hinted.cpp",
        "cascades/cost_derivation.cpp",
        "cascades/enforcers.cpp",
        "cascades/implementers.cpp",
        "cascades/logical_props_derivation.cpp",
        "cascades/logical_rewriter.cpp",
        "cascades/memo.cpp",
        "cascades/physical_rewriter.cpp",
        "cascades/rewrite_queues.cpp",
        "defs.cpp",
        "explain.cpp",
        "index_bounds.cpp",
        "metadata.cpp",
        "node.cpp",
        "opt_phase_manager.cpp",
        "props.cpp",
        "reference_tracker.cpp",
        "rewrites/const_eval.cpp",
        "rewrites/path.cpp",
        "rewrites/path_lower.cpp",
        "syntax/expr.cpp",
        "utils/abt_hash.cpp",
        'utils/ce_math.cpp',
        "utils/interval_utils.cpp",
        "utils/memo_utils.cpp",
        "utils/utils.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/exec/sbe/query_sbe_values",
    ],
)

env.Library(
    target="unit_test_utils",
    source=[
        "utils/unit_test_utils.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/pipeline/pipeline",
        "$BUILD_DIR/mongo/db/query/optimizer/optimizer",
        "$BUILD_DIR/mongo/db/query/query_test_service_context",
        "$BUILD_DIR/mongo/unittest/unittest",
    ],
)

env.CppUnitTest(
    target='optimizer_test',
    source=[
        "logical_rewriter_optimizer_test.cpp",
        "optimizer_test.cpp",
        "physical_rewriter_optimizer_test.cpp",
        "reference_tracker_test.cpp",
        "rewrites/path_optimizer_test.cpp",
        "interval_intersection_test.cpp",
    ],
    LIBDEPS=[
        "optimizer",
        "unit_test_utils",
    ],
)

env.CppUnitTest(
    target='optimizer_failure_test',
    source=[
        "optimizer_failure_test.cpp",
    ],
    LIBDEPS=[
        "optimizer",
        "unit_test_utils",
    ],
)