AmoghAtreya commented on code in PR #44955:
URL: https://github.com/apache/superset/pull/44955#discussion_r4354413716


##########
superset-frontend/packages/superset-ui-chart-controls/src/utils/headerGroups.ts:
##########
@@ -61,6 +63,33 @@ export type HeaderGroupCell = {
 
 export const TIME_COMPARE_MAIN_KEY = 'Main';
 
+/** English msgid for `__timestamp`; `COLUMN_NAME_ALIASES` holds `t('Time')`. 
*/
+const DTTM_ALIAS_SOURCE_LABEL = 'Time';
+
+function getColumnNameAliasLabels(col: string): string[] {
+  const translated = COLUMN_NAME_ALIASES[col];
+  const source = col === DTTM_ALIAS ? DTTM_ALIAS_SOURCE_LABEL : undefined;
+  return [
+    ...new Set(
+      [source, translated].filter((label): label is string => Boolean(label)),
+    ),
+  ];
+}
+
+export function getKnownColumnConfigKeys(

Review Comment:
   Added. `getKnownColumnConfigKeys` now notes that datasource columns and 
metrics count as known so a real `Time` name is not remapped onto `__timestamp`.



-- 
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]

Reply via email to