AmoghAtreya commented on code in PR #44955:
URL: https://github.com/apache/superset/pull/44955#discussion_r4187428389
##########
superset-frontend/packages/superset-ui-chart-controls/src/utils/headerGroups.ts:
##########
@@ -341,10 +344,18 @@ export function normalizeColumnConfigKeys<T>(
return {};
}
const colnamesSet = new Set(colnames);
+ const aliasToKey = new Map(
+ colnames
+ .filter(col => COLUMN_NAME_ALIASES[col])
+ .map(col => [COLUMN_NAME_ALIASES[col], col]),
+ );
Review Comment:
Good catch. The Map could silently keep the last column if two colnames
shared a display alias.
`normalizeColumnConfigKeys` now treats colliding aliases as ambiguous and
skips remapping them, so a leftover `Time` entry is not written onto the wrong
column. Unique aliases still remap as before (`Time` → `__timestamp`).
Covered by `normalizeColumnConfigKeys skips remapping when a display alias
is ambiguous`.
--
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]