john-bodley commented on code in PR #24488:
URL: https://github.com/apache/superset/pull/24488#discussion_r1239082684


##########
superset/daos/dataset.py:
##########
@@ -364,17 +364,6 @@ def create_metric(
     @staticmethod
     def bulk_delete(models: Optional[list[SqlaTable]], commit: bool = True) -> 
None:
         item_ids = [model.id for model in models] if models else []
-        # bulk delete, first delete related data

Review Comment:
   I'm not sure if this was required because when you bulk delete a table 
(using the `delete()` method) you bypass the ORM and that's where the cascade 
logic resides, but given we've adopted the "shift left" mentality it's 
something of a moot point, i.e., the database will handle the deletion 
irrespective of how the records are deleted (SQLAlchemy ORM, raw connection, 
MySQL/PostgreSQL CLI, etc.).



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