Freeman-89 commented on PR #41580:
URL: https://github.com/apache/superset/pull/41580#issuecomment-5062375309

   After merging the latest master, the owners_filter in 
DatasourceDAO.build_dataset_query() broke because commit 33f0fc93ed ("feat: 
introduce Subject model and entity editors/viewers") removed the sqlatable_user 
association table from the codebase and replaced it with the new 
sqlatable_editors + Subject system.
   The old code referenced sqla_models.sqlatable_user which no longer exists, 
causing a runtime error.
   Fix: Replaced the legacy JOIN on sqlatable_user with a subquery using 
sqlatable_editors + Subject (filtering on Subject.type == 1 for USER-type 
subjects), matching the pattern already used in 
DatasetDAO.apply_column_operators().
   This also eliminates the need for .distinct() since the subquery approach 
(WHERE id IN (...)) doesn't produce duplicate rows.


-- 
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]

Reply via email to