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

Table Sort broken : can't resolve label reference for ORDER BY / GROUP BY Textual SQL Expression 'blah' should be explicitely declared as text('blah') #8177

Closed
squalou opened this issue Sep 5, 2019 · 2 comments · Fixed by #8180
Labels
!deprecated-label:bug Deprecated label - Use #bug instead v0.34

Comments

@squalou
Copy link

squalou commented Sep 5, 2019

Charts with an "order by" that used to work in 0.28 are now broken whith ORDER BY or GROUP BY queries

Expected results

A Table Chart is displayed
(example chart option in 'how to reproduce' screenshot)

Actual results

Exception displayed (see screenshot)

Screenshots

unnamed

How to reproduce the bug

  1. Go to Chart, ceate a Table chart
  2. Select some fields in "NOT GROUP BY", choose a column for "ordering"
  3. Run
  4. See error

2019-09-05 11-03-16 screenshot

Environment

(please complete the following information):

  • superset version: 0.34 - also tried on master HEAD @ de6d963
  • python version: 3.6
  • node.js version: 12.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [x ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x ] I have reproduced the issue with at least the latest released version of superset.
  • [x ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Could be related to SQLAlchemy syntax,
looks like this : https://stackoverflow.com/questions/35132463/sqlalchemy-core-order-by-desc

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label Sep 5, 2019
@squalou
Copy link
Author

squalou commented Sep 5, 2019

Additional info : looks like adding the 'Ordering' column in the list of 'Columns' works (but it changes the displayed table, so end users will complain ;) )

Maybe not in all situations.

2019-09-05 11-08-01 screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead v0.34
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants