taosdata / taosdata/TDengine

Use float or double type to store data, the loss of precision is a little heavy

Open
#24,337 1 comment 0 reactions 1 assignee View on GitHub

@yu285 is already working on this.

Since Jan 8, 2024.

bug
Dominant language
C
Stars
25.1k
Forks
5k
Avg merge
4d 59m
Merged PRs (30d)
7

Description

tdengine版本:3.2.2.0

将数据类型设置为float或者double类型的时候,存储电表相关数据存在精度损失,并且对电表电量进行sum时候,结果也有精度损失。

aab5e7ec8ab66dde113a3d709040aa3

只有将数据类型换成nchar的时候可以解决这个问题,但是会无法sum做计算操作。有没有什么好的方案可以解决这个问题,类似于decimal数据类型或者其他方案进行解决。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.