Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sql_lab] Sqllab results not sorting float column correctly #16971

Closed
2 tasks done
michellethomas opened this issue Oct 5, 2021 · 2 comments
Closed
2 tasks done

[sql_lab] Sqllab results not sorting float column correctly #16971

michellethomas opened this issue Oct 5, 2021 · 2 comments
Assignees
Labels
#bug Bug report sqllab Namespace | Anything related to the SQL Lab

Comments

@michellethomas
Copy link
Contributor

When I query a float column and try to sort the values in the sqllab results, the values do not always get sorted correctly (especially for larger numbers).

How to reproduce the bug

  1. Go to sqllab
  2. Query a column along with a float column (this typically happens with larger numbers)
  3. Click the results header to sort the float column and see some numbers not in the correct order

For example if you use the superset examples and query

SELECT status, year, sum(sales)
FROM main.cleaned_sales_data
GROUP BY status, year

The sales column is not always sorted in the correct order. It should be sorting smallest to largest but some of the values are not in the correct order (for example it shows 144729.96000000002 as smaller than 26260.210000000003 ).

Expected results

Expected that float numbers should be sorted in the correct order.

Actual results

Float column values are not always sorted correctly.

Environment

(please complete the following information):

  • browser type and version:
  • superset version: superset version
  • python version: python --version
  • node.js version: node -v
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [] I have reproduced the issue with at least the latest released version of superset. (branch I am testing on is around a week old)
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@michellethomas michellethomas added sqllab Namespace | Anything related to the SQL Lab #bug Bug report labels Oct 5, 2021
@junlincc
Copy link
Member

junlincc commented Oct 5, 2021

thanks @michellethomas, is it a regression in latest deploy?

@etr2460
Copy link
Member

etr2460 commented Oct 5, 2021

@junlincc this is not a recent regression, it's been around for a while now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

No branches or pull requests

5 participants