mistercrunch commented on code in PR #34177:
URL: https://github.com/apache/superset/pull/34177#discussion_r2208568217
##########
superset/connectors/sqla/models.py:
##########
@@ -2053,6 +1894,14 @@ def load_database(self: SqlaTable) -> None:
session = inspect(self).session # pylint: disable=disallowed-name
self.database =
session.query(Database).filter_by(id=self.database_id).one()
+ def get_query_str(self, query_obj: QueryObjectDict) -> str:
+ """Returns a query as a string using ExploreMixin implementation"""
+ return ExploreMixin.get_query_str(self, query_obj)
+
+ def text(self, clause: str) -> TextClause:
+ """Returns a text clause using ExploreMixin implementation"""
+ return ExploreMixin.text(self, clause)
Review Comment:
@betodealmeida these two methods are a bit of a hack, where from my
understanding the inheritance scheme is non linear in some specific cases, so
we need to cherry pick some methods to skip a level of inheritance.
PR still achieves the goal of de-duping logic, but doesn't fully fix the
inheritance scheme and related patchwork ...
--
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]