villebro commented on a change in pull request #11731:
URL:
https://github.com/apache/incubator-superset/pull/11731#discussion_r525605556
##########
File path: superset/connectors/sqla/models.py
##########
@@ -1358,11 +1362,15 @@ def fetch_metadata(self, commit: bool = True) ->
MetadataResult:
if new_column.type != col["type"]:
results.modified.append(col["name"])
new_column.type = col["type"]
+ new_column.expression = ""
new_column.groupby = True
new_column.filterable = True
self.columns.append(new_column)
if not any_date_col and new_column.is_temporal:
any_date_col = col["name"]
+ self.columns.extend(
+ [col for col in old_columns_by_name.values() if col.expression]
+ )
Review comment:
This ensures that calculated columns are not dropped.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]