Vitor-Avila commented on code in PR #33626:
URL: https://github.com/apache/superset/pull/33626#discussion_r2116708548
##########
superset/daos/dataset.py:
##########
@@ -184,15 +185,24 @@ def update(
"""
if item and attributes:
+ force_update: bool = False
if "columns" in attributes:
cls.update_columns(
item,
attributes.pop("columns"),
override_columns=bool(attributes.get("override_columns")),
)
+ force_update = True
if "metrics" in attributes:
cls.update_metrics(item, attributes.pop("metrics"))
+ force_update = True
+
+ # columns and metrics are stored in separate tables so if they
change we
+ # force an update to the dataset too to ensure the
last_updated_timestamp
+ # is updated (it's possible no other dataset attributes are
changed).
+ if force_update:
Review Comment:
@michael-s-molina are you suggesting we always do it?
Technically we could. I opted for this flow because we only need to worry
with this in case columns and/or metrics were updated (and no direct dataset
attribute was). I don't think there would be a side-effect of always doing,
it's just one extra query.
--
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]