This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 5.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 5d333ac6dce1ea34702a681c1641c8c665000ff9
Author: Elizabeth Thompson <[email protected]>
AuthorDate: Wed Mar 19 17:33:28 2025 -0700

    fix: do not add calculated columns when syncing (#32761)
    
    (cherry picked from commit 89ce7ba0b0dc83e44166672136fd62d58aef3f08)
---
 superset-frontend/src/components/Datasource/DatasourceEditor.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx 
b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
index fae0270828..ceb832d750 100644
--- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
@@ -712,7 +712,11 @@ class DatasourceEditor extends PureComponent {
         newCols,
         this.props.addSuccessToast,
       );
-      this.setColumns({ databaseColumns: columnChanges.finalColumns });
+      this.setColumns({
+        databaseColumns: columnChanges.finalColumns.filter(
+          col => !col.expression, // remove calculated columns
+        ),
+      });
       this.props.addSuccessToast(t('Metadata has been synced'));
       this.setState({ metadataLoading: false });
     } catch (error) {

Reply via email to