sadpandajoe opened a new pull request, #44579:
URL: https://github.com/apache/superset/pull/44579

   ### SUMMARY
   Virtual (SQL-based) datasets show the "Normalize column names" option in the
   Advanced section of the dataset editor, but it has no effect there — the
   column-metadata path used for virtual datasets never applies it (only 
physical
   datasets do, via `db_engine_spec.denormalize_name`). This hides the control 
for
   virtual datasets while keeping it visible and functional for physical 
datasets,
   where it's still meaningful.
   
   ### ROOT CAUSE
   `DatasourceEditor.tsx`'s Advanced fieldset rendered the `normalize_columns`
   checkbox unconditionally, regardless of `datasourceType`. On the backend,
   `get_physical_table_metadata()` applies `normalize_columns` when reflecting a
   physical table's columns, but `get_virtual_table_metadata()` (used for 
SQL-based
   datasets) has no such parameter and never denormalizes anything — so 
toggling the
   option for a virtual dataset silently did nothing, which is confusing since 
the
   control implies it should.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Pending — will attach before/after evidence once QA runs against this draft 
PR.
   
   ### TESTING INSTRUCTIONS
   1. Create a virtual dataset (e.g. from a SQL Lab query) and open its edit 
modal's
      "Settings" tab, then expand "Advanced" — "Normalize column names" is no 
longer
      shown.
   2. Create or edit a physical dataset (from an existing table) the same way —
      "Normalize column names" is still shown and toggleable, unchanged 
behavior.
   3. `npx jest 
superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx`
      — passes, including two new tests covering both cases above.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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