You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/11/29 17:11:49 UTC

[GitHub] [superset] betodealmeida commented on a change in pull request #17573: fix(sqllab): Floating numbers not sorting correctly in result column

betodealmeida commented on a change in pull request #17573:
URL: https://github.com/apache/superset/pull/17573#discussion_r758569520



##########
File path: superset-frontend/src/components/FilterableTable/FilterableTable.tsx
##########
@@ -337,9 +342,9 @@ export default class FilterableTable extends PureComponent<
         return -1;
       }
       if (descending) {
-        return aValue < bValue ? 1 : -1;
+        return parseFloatingNums(aValue) < parseFloatingNums(bValue) ? 1 : -1;

Review comment:
       What happens if the user tries to sort a column that has strings, not numbers?




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org