Search code examples
interfaceapache-iotdb

Why the data precision is lost when calling python API to query floating point data in Apache IoTDB?


When I checked the floating point data queried using Python API of Apache IoTDB, I found that the data precision is lost. The data is also stored in floating data type in Apache IoTDB. How to deal with this? Is there something wrong with my interface call?


Solution

  • The datatype for python's floating point numbers are set to 'double' type by default. Forced conversion of the datatype here will cause loss of precision. You can set the storage datatype of Apache-IoTDB to 'double' to avoid this loss.