Skip to content

Fix CSV import detecting columns of decimal numbers as INTEGER - #4218

Open
deepsidhu1313 wants to merge 1 commit into
sqlitebrowser:masterfrom
deepsidhu1313:fix/csv-import-real-detection
Open

deepsidhu1313 wants to merge 1 commit into
sqlitebrowser:masterfrom
deepsidhu1313:fix/csv-import-real-detection

Conversation

@deepsidhu1313

Copy link
Copy Markdown
Contributor

In ImportCsvDialog::generateFieldList, a column which had already been
detected as REAL was reset to INTEGER when the next value was also numeric,
so the detected type flipped back and forth from row to row. For example a
column with the values 0.3 and 0.06 ended up as INTEGER. Keep the type
REAL as long as the values are still convertible to a floating point
number.

Fixes #4035

In ImportCsvDialog::generateFieldList, a column which had already been
detected as REAL was reset to INTEGER when the next value was also numeric,
so the detected type flipped back and forth from row to row. For example a
column with the values 0.3 and 0.06 ended up as INTEGER. Keep the type
REAL as long as the values are still convertible to a floating point
number.

Fixes sqlitebrowser#4035

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

floating point data being imported as integers when small values are present

2 participants