eschutho commented on code in PR #20862:
URL: https://github.com/apache/superset/pull/20862#discussion_r932764925
##########
superset/datasets/dao.py:
##########
@@ -147,14 +147,22 @@ def validate_metrics_uniqueness(dataset_id: int,
metrics_names: List[str]) -> bo
@classmethod
def update(
- cls, model: SqlaTable, properties: Dict[str, Any], commit: bool = True
+ cls,
+ model: SqlaTable,
+ properties: Dict[str, Any],
+ commit: bool = True,
) -> Optional[SqlaTable]:
"""
Updates a Dataset model on the metadata DB
"""
if "columns" in properties:
- cls.update_columns(model, properties.pop("columns"), commit=commit)
+ cls.update_columns(
+ model,
+ properties.pop("columns"),
+ commit=commit,
+ override_columns=bool(properties.get("override_columns")),
+ )
if "metrics" in properties:
cls.update_metrics(model, properties.pop("metrics"), commit=commit)
Review Comment:
for put /dataset, does override_columns literally mean just the columns? Are
we putting or patching here? Does it include the dataset? Wouldn't we be also
overriding the metrics?
--
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]