Skip to content

Commit f851e99

Browse files
authored
chore(sqla): Address performance tradeoff with eager loading (#23113)
1 parent 22a6487 commit f851e99

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
@@ -234,7 +234,6 @@ class TableColumn(Model, BaseColumn, CertificationMixin):
234234
table: Mapped["SqlaTable"] = relationship(
235235
"SqlaTable",
236236
back_populates="columns",
237-
lazy="joined", # Eager loading for efficient parent referencing with selectin.
238237
)
239238
is_dttm = Column(Boolean, default=False)
240239
expression = Column(MediumText())
@@ -449,7 +448,6 @@ class SqlMetric(Model, BaseMetric, CertificationMixin):
449448
table: Mapped["SqlaTable"] = relationship(
450449
"SqlaTable",
451450
back_populates="metrics",
452-
lazy="joined", # Eager loading for efficient parent referencing with selectin.
453451
)
454452
expression = Column(MediumText(), nullable=False)
455453
extra = Column(Text)
@@ -551,13 +549,11 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
551549
TableColumn,
552550
back_populates="table",
553551
cascade="all, delete-orphan",
554-
lazy="selectin", # Only non-eager loading that works with bidirectional joined.
555552
)
556553
metrics: Mapped[List[SqlMetric]] = relationship(
557554
SqlMetric,
558555
back_populates="table",
559556
cascade="all, delete-orphan",
560-
lazy="selectin", # Only non-eager loading that works with bidirectional joined.
561557
)
562558
metric_class = SqlMetric
563559
column_class = TableColumn

0 commit comments

Comments
 (0)