Skip to content

Commit 180a029

Browse files
john-bodleyeschutho
authored andcommitted
chore(sqla): Address performance tradeoff with eager loading (#23113)
1 parent 06118d1 commit 180a029

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

superset/connectors/sqla/models.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ class TableColumn(Model, BaseColumn, CertificationMixin):
240240
table: Mapped["SqlaTable"] = relationship(
241241
"SqlaTable",
242242
back_populates="columns",
243-
lazy="joined", # Eager loading for efficient parent referencing with selectin.
244243
)
245244
is_dttm = Column(Boolean, default=False)
246245
expression = Column(MediumText())
@@ -455,7 +454,6 @@ class SqlMetric(Model, BaseMetric, CertificationMixin):
455454
table: Mapped["SqlaTable"] = relationship(
456455
"SqlaTable",
457456
back_populates="metrics",
458-
lazy="joined", # Eager loading for efficient parent referencing with selectin.
459457
)
460458
expression = Column(MediumText(), nullable=False)
461459
extra = Column(Text)
@@ -557,13 +555,11 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
557555
TableColumn,
558556
back_populates="table",
559557
cascade="all, delete-orphan",
560-
lazy="selectin", # Only non-eager loading that works with bidirectional joined.
561558
)
562559
metrics: Mapped[List[SqlMetric]] = relationship(
563560
SqlMetric,
564561
back_populates="table",
565562
cascade="all, delete-orphan",
566-
lazy="selectin", # Only non-eager loading that works with bidirectional joined.
567563
)
568564
metric_class = SqlMetric
569565
column_class = TableColumn

0 commit comments

Comments
 (0)