sarutak commented on a change in pull request #32190:
URL: https://github.com/apache/spark/pull/32190#discussion_r614521932
##########
File path: core/src/main/resources/org/apache/spark/ui/static/stagepage.js
##########
@@ -562,10 +577,16 @@ $(document).ready(function () {
}
],
"columnDefs": [
- { "visible": false, "targets": 15 },
- { "visible": false, "targets": 16 },
- { "visible": false, "targets": 17 },
- { "visible": false, "targets": 18 }
+ // String with structures like : 'bytes / bytes',
'bytes / bytes'
+ // they should be sorted as numerical-order instead of
lexicographical-order.
+ { "type": "size", "targets": 9 },
+ { "type": "size", "targets": 10 },
+ { "type": "size", "targets": 11 },
+ { "type": "size", "targets": 12 },
+ { "type": "size", "visible": false, "targets": 15 },
Review comment:
Why `13` and `14` are not cared?
##########
File path: core/src/main/resources/org/apache/spark/ui/static/stagepage.js
##########
@@ -43,6 +43,21 @@ $.extend( $.fn.dataTable.ext.type.order, {
a = ConvertDurationString( a );
b = ConvertDurationString( b );
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
+ },
+
+
+ "size-pre": parseFloat,
+
+ "size-asc": function ( a, b ) {
+ a = parseFloat( a );
+ b = parseFloat( b );
+ return ((a < b) ? -1 : ((a > b) ? 1 : 0));
+ },
+
+ "size-desc": function ( a, b ) {
+ a = parseFloat( a );
+ b = parseFloat( b );
Review comment:
Should we care the case if a or b is `NaN`?
If the value of a metrics is 0, `parseFloat("")` will be performed and it
returns `NaN` right?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]