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/01/21 19:25:40 UTC

[GitHub] [superset] willbarrett commented on a change in pull request #12663: feat: request ids on API related endpoints

willbarrett commented on a change in pull request #12663:
URL: https://github.com/apache/superset/pull/12663#discussion_r562140696



##########
File path: superset/views/base_api.py
##########
@@ -452,15 +483,18 @@ def get_text_for_model(model: Model) -> str:
         # handle filters
         filters = self._get_related_filter(datamodel, column_name, args.get("filter"))
         # Make the query
-        count, values = datamodel.query(
+        _, rows = datamodel.query(

Review comment:
       This is interesting - the endpoint doesn't behave the way I would expect. If I passed multiple filters and one of them was IDs, I would expect it to be a subset of the IDs listed. If I passed only a list of IDs, I would expect only the listed IDs to be returned.  Would it be possible to treat the IDs list as part of the original query? That would also avoid running two queries to build this request.




----------------------------------------------------------------
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:
users@infra.apache.org



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