wangxiaojing commented on code in PR #27876:
URL: https://github.com/apache/flink/pull/27876#discussion_r3347076149
##########
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:
Thanks for the review @zhuzhurk!
I have updated the PR to address your feedback:
1. Reverted all backend changes: The runtime and REST API are now completely
untouched.
2. Reverted generic utility changes: The createSortFn in
job-checkpoints-subtask.component.ts has been restored to its original state.
3. Focused Web UI implementation: The "Endpoint" column now correctly uses
the data from existing vertex APIs, and the sortEndpointFn is implemented
independently to keep the changes surgical.
Please take another look. Thank you!
--
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]