fix the optimization for LAST/FIRST/LAST_BY/FIRST_BY on non-time columns, modify the AccumulatorFactory to explicitly verify if the sort key in aggregations(last, first, last_by, first_by) is actually the time column #46419
| Job | Run time |
|---|---|
| 16s | |
| 16s |
| Job | Run time |
|---|---|
| 16s | |
| 16s |