Skip to content

Commit

Permalink
fix: TOOLS-2469 parse floats as doubles to increase precision (#37)
Browse files Browse the repository at this point in the history
* fix: parse floats as doubles to increase precision

* build: increase version to 3.0.1
  • Loading branch information
dwelch-spike authored Apr 12, 2023
1 parent 5aea0a9 commit 1c5e835
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<a name="Dependencies"></a>
## Dependencies
Following dependencies are downloaded automatically:
* Aerospike Java client 4.3.0 or greater
* Aerospike Java client 6.1.6 or greater
* Apache commons cli 1.2
* Log4j 2.17.1
* Junit 4.4
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-load</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<name>Aerospike DSV Loader</name>
<packaging>jar</packaging>

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/aerospike/load/AsWriterTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ private Bin createBinForInteger(String binName, String binRawValue) {
private Bin createBinForFloat(String binName, String binRawValue) {

try {
float binfloat = Float.parseFloat(binRawValue);
// parse as a double to get greater precision
double binfloat = Double.parseDouble(binRawValue);

// Now server support float
return new Bin(binName, binfloat);

} catch (Exception e) {
Expand Down

0 comments on commit 1c5e835

Please sign in to comment.