zhuzhurk commented on code in PR #27876:
URL: https://github.com/apache/flink/pull/27876#discussion_r3116257039
##########
flink-runtime-web/web-dashboard/src/app/pages/job/checkpoints/subtask/job-checkpoints-subtask.component.ts:
##########
@@ -48,13 +48,13 @@ import { NzTableModule, NzTableSortFn } from
'ng-zorro-antd/table';
import { JobLocalService } from '../../job-local.service';
function createSortFn(
- selector: (item: CompletedSubTaskCheckpointStatistics) => number | boolean
+ selector: (item: CompletedSubTaskCheckpointStatistics) => number | boolean |
string | null
): NzTableSortFn<SubTaskCheckpointStatisticsItem> {
- // FIXME This type-asserts that pre / next are a specific subtype.
- return (pre, next) =>
- selector(pre as CompletedSubTaskCheckpointStatistics) > selector(next as
CompletedSubTaskCheckpointStatistics)
- ? 1
- : -1;
+ return (pre, next) => {
+ const a = selector(pre as CompletedSubTaskCheckpointStatistics) ?? '';
+ const b = selector(next as CompletedSubTaskCheckpointStatistics) ?? '';
+ return a > b ? 1 : -1;
+ };
Review Comment:
Changes to `createSortFn` are not needed, since `sortEndpointFn` is
implemented separately without using it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]