mikebridge commented on code in PR #44851:
URL: https://github.com/apache/superset/pull/44851#discussion_r4200605498
##########
superset-frontend/src/explore/reducers/exploreReducer.ts:
##########
@@ -300,6 +307,17 @@ export default function exploreReducer(
datasource: typedAction.datasource,
};
},
+ [actions.SYNC_SEMANTIC_METADATA]() {
+ const typedAction = action as SyncSemanticMetadataAction;
+ const refreshedState = { ...state, datasource: typedAction.datasource };
+ return {
+ ...refreshedState,
+ controls: getControlsState(
Review Comment:
Fixed in `58e8cbb1`. Metadata sync refreshes the existing controls’ choices
and validation rather than rebuilding them through their initializers. The
regression initializes a temporal filter, removes it, syncs metadata, and
requires that it remains empty while form_data stays unchanged. It also retains
the removed-choice and session-history assertions, so ordinary validation still
runs without inventing a time-range edit.
One deliberate exception, added in `9c6e0710` after merging master: the
refresh re-runs the initializer for the table's derived
`temporal_columns_lookup` only, so the next query uses the dimension's fresh
temporal classification. The selected grain and cleared filters are preserved,
and because this is a metadata-only update it does not create a history entry;
the regression covers both temporal transitions through the real table query
builder.
--
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]