-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for reading decimal types from JSON and CSV (#4825)
* Initial support for reading decimal types from JSON and CSV Signed-off-by: Andy Grove <andygrove@nvidia.com> * update docs * Document behavior of JSON option allowNonNumericNumbers * Improve JSON support for INF values * improve decimal tests to cover different rounding cases * reduce the amount of regexp * scalastyle * fix regression and update generated docs * update compatibility guide * update compatibility guide
- Loading branch information
Showing
15 changed files
with
153 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"number" | ||
-1 | ||
0 | ||
1. | ||
0.12 | ||
.12 | ||
+.12 | ||
-.12 | ||
1 | ||
1.01 | ||
12.34 | ||
12.3456 | ||
12345678.12 | ||
33.545454 | ||
33.454545 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ "number": 0 } | ||
{ "number": 12 } | ||
{ "number": 12.0 } | ||
{ "number": 12. } | ||
{ "number": .34 } | ||
{ "number": +.34 } | ||
{ "number": -.34 } | ||
{ "number": 0.34 } | ||
{ "number": 12.34 } | ||
{ "number": 12.3456 } | ||
{ "number": 12.345678 } | ||
{ "number": 123456.78 } | ||
{ "number": 33.454545 } | ||
{ "number": 33.545454 } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ "number": "NaN" } | ||
{ "number": "Infinity" } | ||
{ "number": "-Infinity" } | ||
{ "number": NaN } | ||
{ "number": +INF } | ||
{ "number": -INF } | ||
{ "number": Infinity } | ||
{ "number": +Infinity } | ||
{ "number": -Infinity } |
12 changes: 0 additions & 12 deletions
12
integration_tests/src/test/resources/nan_and_inf_edge_cases.json
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
integration_tests/src/test/resources/nan_and_inf_invalid.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ "number": NAN } | ||
{ "number": nan } | ||
{ "number": INF } | ||
{ "number": Inf } | ||
{ "number": +Inf } | ||
{ "number": -Inf } | ||
{ "number": "NAN" } | ||
{ "number": "nan" } | ||
{ "number": "INF" } | ||
{ "number": "Inf" } | ||
{ "number": "+Inf" } | ||
{ "number": "-Inf" } |
6 changes: 6 additions & 0 deletions
6
integration_tests/src/test/resources/nan_and_inf_strings.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ "number": "NaN" } | ||
{ "number": "+INF" } | ||
{ "number": "-INF" } | ||
{ "number": "Infinity" } | ||
{ "number": "+Infinity" } | ||
{ "number": "-Infinity" } |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.