rusackas commented on PR #35662:
URL: https://github.com/apache/superset/pull/35662#issuecomment-4909692241
@nicob3y thanks for sticking with this. I think there's a real bug in the
name-lookup path: `dataset_macro("some_name")` calls
`DatasetDAO.find_by_id(dataset_id, id_column="table_name")`, which does a
`.one_or_none()` - but `table_name` is only unique per `(database_id, catalog,
schema, table_name)`, not globally. If two datasets share a name you'd get an
unhandled `MultipleResultsFound` instead of a clean `DatasetNotFoundError`. We
hit this exact ambiguity in `datasets/api.py` (fixed for #30377) with a
friendlier 400 and we could use the same pattern here.
There's also still an open Korbit thread on the function doing double duty
(lookup + SQL generation), and some other bot comments to
assess/address/resolve. Thanks!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]