An Amazon-style delivery team compares promised and actual delivery days.
Return shipment_id, delay_days for shipments delivered after the promised day. Sort by shipment_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
shipments7 rows| shipment_id (int) | promised_day (int) | delivered_day (int) |
|---|---|---|
| 1 | 2 | 3 |
| 2 | 4 | 4 |
| 3 | 1 | 3 |
| 4 | 5 | 5 |
| 5 | 3 | 4 |
| 6 | 6 | 8 |
| 7 | 2 | 2 |
Column names and order must match. Sort order is specified in the question.