rhunwicks commented on issue #3302: Create a PandasDatasource
URL: 
https://github.com/apache/incubator-superset/issues/3302#issuecomment-330360525
 
 
   @mistercrunch when is the order of records returned by the `query` function 
significant?
   
   Looking at `SqlaTable.query()`, I think that:
   
   * if `columns` is set then `orderby` is used to determine the order
   * if 'groupby` is set then the `main_metric_expr` is used (in descending 
order) to order the groups
   * if there are metrics (and therefore `columns == []`) but no `groupby` then 
there is no `order by` and the rows will be returned in the order of the SQL 
groups, which will include the `__timestamp` column even when `groupby == []`,
   
   Is it important that when `is_timeseries == True` the rows are returned in 
`__timestamp` order?
   
   I assume not, because then we have both `is_timeseries` and `groupby` then 
`SqlaTable` still returns the rows by `main_metrics_expr` in descending order, 
rather than by either `__timestamp` or `groupby`?
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Reply via email to