john-bodley commented on a change in pull request #16835:
URL: https://github.com/apache/superset/pull/16835#discussion_r715832665



##########
File path: superset/datasets/dao.py
##########
@@ -85,12 +85,23 @@ def validate_table_exists(
             return False
 
     @staticmethod
-    def validate_uniqueness(database_id: int, schema: Optional[str], name: 
str) -> bool:

Review comment:
       @hughhhh I still think the logic isn't quite write. My understanding is 
you would like to override an existing dataset—which currently 
`DatasetDAO.validate_uniqueness(...)` would return  `False` (the name isn't 
great)—and thus it seems one would just want to bypass the 
`DatasetDAO.validate_uniqueness(...)` check. 
   
   The problem is I think the `check_count` condition is dependent on the 
circumstances and thus shouldn't always be `True`. I wonder if the right 
approach is simply to 
[pause](https://github.com/sqlalchemy/sqlalchemy/issues/4746) the event 
listener for specific flows.




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