Repository navigation
feat: add configuration for CSV decimal separator and update CSV formatting logic - #594
Merged
SanjulaGanepola merged 2 commits intoOct 26, 2026
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The configuration and formatting changes are focused and consistent, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Adds configurable decimal separators to CSV exports, supporting locales that use commas while retaining periods as the default.
Changes:
- Adds the Csv Decimal Separator setting with
PeriodandCommaoptions. - Applies numeric formatting to both metadata-based exports and the fallback CSV serializer.
| File | Description |
|---|---|
src/views/results/index.ts |
Applies the selected decimal separator when formatting numeric CSV values. |
src/views/results/contributes.json |
Defines the decimal separator setting and its options. |
package.json |
Registers the setting in the generated extension manifest. |
Review effort: Balanced
SanjulaGanepola
self-requested a review
October 26, 2026 19:29
Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>
SanjulaGanepola
approved these changes
Oct 26, 2026
SanjulaGanepola
left a comment
Member
There was a problem hiding this comment.
@benetti-marco Changes look good and it works as expected. Thanks
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Adds a new setting, Csv Decimal Separator (
vscode-db2i.codegen.csvDecimalSeparator), to control the decimal separator used for numeric values when exporting results with thecsv:prefix.Period(default):1234.56, the current behaviourComma:1234,56This is useful in locales that use a comma as the decimal separator. For example, Excel with Italian regional settings reads
1234.56as text instead of a number.Implementation:
src/views/results/contributes.json, next tocsvColumnDelimiter.package.jsonwas regenerated withvscd --clean.DECIMAL,NUMERIC,DECFLOAT,DOUBLE,FLOATandREALcolumns, and to any value returned as a JS number.csv.stringify, the separator is applied through the library'scast.numberoption.Commaalso works when the column delimiter is a comma.Semicolonis still the most convenient delimiter for Excel.How to test this PR
Commaand, optionally, Csv Column Delimiter toSemicolon.csv: select 1.5 as a, cast(123.45 as decimal(7,2)) as b, 'x.y' as c from sysibm.sysdummy1AandBuse a comma ("1,5","123,45") and that the string columnCstays unchanged ("x.y").Periodand check that the output is the same as before.Checklist
console.logs I added