18 #include "scanner/engine/metadata.h" 19 #include "scanner/engine/table_meta_cache.h" 20 #include "scanner/engine/runtime.h" 27 const std::string INPUT_OP_NAME =
"Input";
28 const std::string OUTPUT_OP_NAME =
"OutputTable";
29 const std::string SAMPLE_OP_NAME =
"Sample";
30 const std::string SPACE_OP_NAME =
"Space";
31 const std::string SLICE_OP_NAME =
"Slice";
32 const std::string UNSLICE_OP_NAME =
"Unslice";
34 const std::vector<std::string> BUILTIN_OP_NAMES = {
41 bool is_builtin_op(
const std::string& name);
44 bool has_table_output{
false};
46 std::vector<i32> op_slice_level;
47 std::map<i64, i64> source_ops;
48 std::map<i64, i64> sink_ops;
49 std::map<i64, i64> slice_ops;
50 std::map<i64, i64> unslice_ops;
51 std::map<i64, i64> sampling_ops;
52 std::map<i64, std::vector<i64>> op_children;
53 std::set<i64> column_sink_ops;
58 std::vector<std::map<i64, std::string>> column_sink_table_names;
61 std::vector<std::map<i64, i64>> slice_input_rows;
63 std::vector<std::map<i64, std::vector<i64>>> slice_output_rows;
66 std::vector<std::map<i64, std::vector<i64>>> unslice_input_rows;
69 std::vector<std::map<i64, std::vector<i64>>> total_rows_per_op;
71 std::vector<i64> total_output_rows;
73 std::map<i64, bool> bounded_state_ops;
74 std::map<i64, bool> unbounded_state_ops;
75 std::map<i64, i32> warmup_sizes;
76 std::map<i64, i32> batch_sizes;
77 std::map<i64, std::vector<i32>> stencils;
80 std::map<i64, i64> input_ops_to_first_op_columns;
82 std::map<i64, i64> sink_ops_to_last_op_columns;
85 std::vector<std::vector<std::tuple<i32, std::string>>> live_columns;
86 std::vector<std::vector<i32>> dead_columns;
87 std::vector<std::vector<i32>> unused_outputs;
88 std::vector<std::vector<i32>> column_mapping;
92 Result validate_jobs_and_ops(
94 const std::vector<proto::Job>& jobs,
95 const std::vector<proto::Op>& ops,
98 Result determine_input_rows_to_slices(
100 const std::vector<proto::Job>& jobs,
101 const std::vector<proto::Op>& ops,
103 storehouse::StorageConfig* storage_config);
105 Result derive_slice_final_output_rows(
106 const proto::Job& job,
107 const std::vector<proto::Op>& ops,
109 i64 slice_input_rows,
111 std::vector<i64>& slice_output_partition);
113 void populate_analysis_info(
114 const std::vector<proto::Job>& jobs,
const std::vector<proto::Op>& ops,
119 void remap_input_op_edges(std::vector<proto::Op>& ops,
124 void remap_sink_op_edges(std::vector<proto::Op>& ops,
DAGAnalysisInfo& info);
126 void perform_liveness_analysis(
const std::vector<proto::Op>& ops,
129 Result derive_stencil_requirements(
131 const proto::Job& job,
const std::vector<proto::Op>& ops,
133 proto::BulkJobParameters::BoundaryCondition boundary_condition,
134 i64 job_idx, i64 task_idx,
135 const std::vector<i64>& output_rows, LoadWorkEntry& output_entry,
136 std::deque<TaskStream>& task_streams, storehouse::StorageConfig* storage_config);
Definition: dag_analysis.h:43
Definition: database.cpp:36