Copilot commented on code in PR #44617:
URL: https://github.com/apache/superset/pull/44617#discussion_r4161673969
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -1892,15 +1899,29 @@ function DatasourceEditor({
/>
)}
{datasourceType === DATASOURCE_TYPES.physical.key && (
- <Field
- inline
- fieldKey="normalize_columns"
- label={t('Normalize column names')}
- description={t(
- 'Allow column names to be changed to case insensitive format, if
supported (e.g. Oracle, Snowflake).',
+ <>
+ <Field
+ inline
+ fieldKey="normalize_columns"
+ label={t('Normalize column names')}
+ description={t(
+ 'Allow column names to be changed to case insensitive format,
if supported (e.g. Oracle, Snowflake).',
+ )}
+ control={<CheckboxControl />}
+ />
+ {datasource.normalize_columns && !normalizeColumnsBaseline && (
+ <Alert
+ css={themeParam => ({ marginBottom: themeParam.sizeUnit * 4 })}
+ type="warning"
+ showIcon
+ message={t(
+ 'Changing this setting will change the casing for all
columns in this dataset, ' +
+ 'which will break any existing charts and dashboard
filters that reference the ' +
+ 'current column names.',
Review Comment:
This warning is unconditional for every physical dataset, but
`normalize_columns` only changes behavior when the engine supports
normalization (as the field description states); the base engine implementation
is a no-op. On unaffected engines, and in cases where casing remains
compatible, saying the setting “will” change every column and “will” break
charts is false. Please use conditional wording such as “may change” / “may
break” (and update the translation catalog and assertion accordingly).
--
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]