rusackas opened a new pull request, #40859: URL: https://github.com/apache/superset/pull/40859
### SUMMARY Superset already has a formula-escaping CSV writer, `csv.df_to_escaped_csv()`, used by the viz, query-context, and SQL Lab export paths. However, `apply_client_processing()` in `superset/charts/client_processing.py` wrote the `result_format=CSV` output with a raw `df.to_csv()`, so that one path didn't get the same handling as the others. This routes that branch through `csv.df_to_escaped_csv()` as well, so CSV output is produced consistently regardless of which path generated it. No change for values that don't need escaping (verified against the existing CSV tests). ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — backend output consistency. ### TESTING INSTRUCTIONS ``` pytest tests/unit_tests/charts/test_client_processing.py -k csv ``` Existing CSV tests are unchanged; a new test asserts a value beginning with a formula trigger is neutralized with a leading single-quote in this path. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
