Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CSV empty String to Number conversion #3786

Merged
merged 3 commits into from Apr 26, 2023

Conversation

manticore-projects
Copy link
Contributor

CSV Number Columns can have empty Cells, e.g. '' which still need to be translated to a Number Column Type. So instead of creating a new Number from the empty String (which will fail), a NULL Number must be returned.

Example CSV:

"102.22"
""

Shall return '102.22', null instead of '102.22', '' or else conversion to DECIMAL(12.2) will fail.

fixes #3785

CSV Number Columns can have empty Cells, e.g. '' which still need to be 
translated to a Number Column Type. So instead of creating a new Number 
from the empty String (which will fail), a NULL Number must be returned.

fixes h2database#3785
@andreitokar
Copy link
Contributor

Thank you for your contribution!

Please send a licence statement as described here
https://h2database.com/html/build.html#providing_patches
to our mailing list / Google group:
https://groups.google.com/g/h2-database

@andreitokar andreitokar merged commit b89eb3a into h2database:master Apr 26, 2023
4 checks passed
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.

CSVRead: Fails to translate empty Numbers, when cells are quoted
2 participants