Handle NaN value in Numeric field
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
If a Numeric field contains a NaN value there is an error thrown even if the class type is double or decimal?.
Instead of throwing an exception a double.NaN should be returned, and in the case of nullable decimal perhaps null.
Here is the question on Stack Overflow with reproduction steps.
https://stackoverflow.com/questions/73854808/dapper-query-with-nan-values/73873429#73873429
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Stack Overflow reproduction linked in the issue and trace Dapper's numeric-field mapping for double and nullable decimal values. Add regression coverage for NaN handling, then verify that non-nullable double returns double.NaN and nullable decimal follows the requested null behavior without throwing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100