Commit 731ad2a
authored
Rework task assignation mechanism (#216)
* Introduce with_distributed_execution method and remove DistributedExt from anything that's not a SessionStateBuilder
* Rework how tasks are assigned to stages
* Use files_per_task and cardinality_effect_factor for choosing the right tasks for the different stages
* Update all tests to use the new task estimation mechanism
* Fix when worker urls is zero or one and add tests
* Move back to `with_distributed_channel_resolver` and let users inject either `DistributedPhysicalOptimizerRule` or their own rules
* Add files_per_task and cardinality_task_sf to examples
* Improve docs
* add impl TaskEstimator for Arc<&dyn TaskEstimator>
* Add task estimator tests
* Explain why we need to count distinct files
* Return an error if task_count == 0
* Factor out apply_scale_factor
* Add task estimator doc comments
* Add more docs to apply_network_boundaries
* Extend files_per_task docs
* Rollback DistributedExt de-implementation from SessionConfig, SessionState and SessionContext1 parent dd853a7 commit 731ad2a
File tree
23 files changed
+1476
-693
lines changed- benchmarks/src/tpch
- examples
- src
- distributed_planner
- metrics
- test_utils
- tests
23 files changed
+1476
-693
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 104 | | |
127 | 105 | | |
128 | 106 | | |
| |||
134 | 112 | | |
135 | 113 | | |
136 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
137 | 123 | | |
138 | 124 | | |
139 | 125 | | |
| |||
142 | 128 | | |
143 | 129 | | |
144 | 130 | | |
145 | | - | |
146 | | - | |
| 131 | + | |
147 | 132 | | |
148 | 133 | | |
149 | 134 | | |
150 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
151 | 141 | | |
152 | 142 | | |
| 143 | + | |
153 | 144 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
160 | 154 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 155 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 156 | + | |
176 | 157 | | |
177 | 158 | | |
178 | 159 | | |
| |||
196 | 177 | | |
197 | 178 | | |
198 | 179 | | |
199 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
200 | 186 | | |
201 | 187 | | |
202 | 188 | | |
| |||
218 | 204 | | |
219 | 205 | | |
220 | 206 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | 207 | | |
225 | 208 | | |
226 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | | - | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | | - | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | | - | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
0 commit comments