You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2023/07/14 22:51:19 UTC

[superset] branch 2.1 updated: chore(sqla): Address performance tradeoff with eager loading (#23113)

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 180a0297b4 chore(sqla): Address performance tradeoff with eager loading (#23113)
180a0297b4 is described below

commit 180a0297b45a6fd53286f262a0bcf59bd754d96c
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Sat Feb 18 11:14:31 2023 +1300

    chore(sqla): Address performance tradeoff with eager loading (#23113)
---
 superset/connectors/sqla/models.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 7b2f1999f9..989b55c7fc 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -240,7 +240,6 @@ class TableColumn(Model, BaseColumn, CertificationMixin):
     table: Mapped["SqlaTable"] = relationship(
         "SqlaTable",
         back_populates="columns",
-        lazy="joined",  # Eager loading for efficient parent referencing with selectin.
     )
     is_dttm = Column(Boolean, default=False)
     expression = Column(MediumText())
@@ -455,7 +454,6 @@ class SqlMetric(Model, BaseMetric, CertificationMixin):
     table: Mapped["SqlaTable"] = relationship(
         "SqlaTable",
         back_populates="metrics",
-        lazy="joined",  # Eager loading for efficient parent referencing with selectin.
     )
     expression = Column(MediumText(), nullable=False)
     extra = Column(Text)
@@ -557,13 +555,11 @@ class SqlaTable(Model, BaseDatasource):  # pylint: disable=too-many-public-metho
         TableColumn,
         back_populates="table",
         cascade="all, delete-orphan",
-        lazy="selectin",  # Only non-eager loading that works with bidirectional joined.
     )
     metrics: Mapped[List[SqlMetric]] = relationship(
         SqlMetric,
         back_populates="table",
         cascade="all, delete-orphan",
-        lazy="selectin",  # Only non-eager loading that works with bidirectional joined.
     )
     metric_class = SqlMetric
     column_class = TableColumn