33modeling opened a new pull request, #45782:
URL: https://github.com/apache/superset/pull/45782
### SUMMARY
Related to #45660. When `CSV_EXPORT` sets `decimal=","`, homogeneous float
columns use commas but `Decimal` and mixed object-valued numeric cells still
contain dots. SQL Lab also converts decimals to strings before the CSV writer
can apply the separator. Streaming exports already format these typed values.
Format finite decimals and real numeric object cells in the shared CSV
serializer, preserving exact decimal scale. Remove SQL Lab's earlier string
conversion so the type remains available at serialization. Leave text,
booleans, missing values, numeric dtypes and formula protection intact.
Document the existing export configuration separately from the UI locale.
This addresses the configured CSV separator inconsistency. It does not
automatically apply chart D3 formatting, infer an Excel locale, or turn numeric
XLSX cells into display strings, and does not close the broader formatting
request.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable: serialized CSV output. With `sep=";", decimal=","`:
```text
before: Decimal("12.3400") -> 12.3400; float -> 12,34
after: Decimal("12.3400") -> 12,3400; float -> 12,34
```
### TESTING INSTRUCTIONS
- Eight added separator cases on the base source: five fail, three control
cases pass. All pass with the fix.
- All 56 tests pass across CSV utilities, SQL Lab export, streaming export
and Excel utilities.
- The staged-file pre-commit hooks pass, including mypy, Ruff and Pylint.
- Configure `CSV_EXPORT = {"encoding": "utf-8-sig", "sep": ";", "decimal":
","}` and export typed Decimal and float metrics. Numeric cells should use
commas, decimal trailing zeros remain, and a text value `"1.25"` remains
unchanged.
### ADDITIONAL INFORMATION
- [x] Has associated issue: #45660
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] 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]