ktmud commented on a change in pull request #12674: URL: https://github.com/apache/superset/pull/12674#discussion_r563193676
########## File path: superset/charts/commands/data.py ########## @@ -82,6 +82,10 @@ def set_query_context(self, form_data: Dict[str, Any]) -> QueryContext: except ValidationError as error: raise error + for query in self._query_context.queries: + if query.row_limit and query.metrics and not query.orderby: + query.orderby = [(query.metrics[0], False)] Review comment: IIRC, word cloud was using the legacy API pre 0.37. Maybe that's why? I added a [“sort by metric” option](https://github.com/apache-superset/superset-ui/pull/831) for Sankey not long ago (disabled by default), maybe you can take a similar approach? ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org