You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/27 19:54:13 UTC

[GitHub] [superset] john-bodley commented on a diff in pull request #20893: fix: Address performance regression introduced in #11785

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


##########
superset/connectors/sqla/models.py:
##########
@@ -835,11 +836,9 @@ def get_perm(self) -> str:
             raise DatasetInvalidPermissionEvaluationException()
         return f"[{self.database}].[{self.table_name}](id:{self.id})"
 
-    @property
+    @hybrid_property
     def name(self) -> str:
-        if not self.schema:
-            return self.table_name
-        return "{}.{}".format(self.schema, self.table_name)
+        return self.schema + "." + self.table_name if self.schema else self.table_name

Review Comment:
   The logic needed to be translated into a function that SQLAlchemy could understand as we're using this hybrid property as a filter.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org