Currently the scheduler uses a single-pass algorithm to allocate scan ranges to nodes. It has several deficiencies:
- It doesn't guarantee that the desired number of instances are created. E.g. if mt_dop is 4, there are 3 impalads and 9 scan ranges, it should create 3 instances per impala but doesn't reliably.
- It tends to over-allocate to the first instances it visits.
- The result depends quite a bit on the input order of the scan ranges.