Is your feature request related to a problem? Please describe.
I'm using TDengine to store and analyze large-scale cryptocurrency data. My use case involves tracking and calculating financial metrics like cryptocurrency prices, transaction amounts, and market capitalizations, which require extremely high precision. However, I am always frustrated when I encounter inaccuracies due to the limitations of the FLOAT data type in TDengine. The lack of a DECIMAL data type to handle large numbers with fine precision makes it difficult to accurately represent financial data, leading to potential rounding errors and imprecise calculations.
Describe your desired behavior
I want TDengine to support a DECIMAL data type, similar to MySQL's DECIMAL(p,s), which would allow me to store and process numbers with high precision and large scale (e.g., DECIMAL(40,18)). This would enable TDengine to accurately handle financial data, ensuring that calculations involving cryptocurrencies and other financial metrics are precise and reliable.
Describe your solutions/suggestions if you've any
I suggest implementing a DECIMAL data type within TDengine that supports user-defined precision and scale. This data type should use fixed-point arithmetic to avoid the inaccuracies inherent in floating-point representations. The flexibility to define precision (e.g., 40 digits) and scale (e.g., 18 decimal places) would make TDengine a powerful tool for financial applications, allowing for accurate storage and computation of values like cryptocurrency prices, trading volumes, and market capitalizations.
Additional context
In the cryptocurrency industry, precision is non-negotiable. A minor error in representing a value could lead to significant financial discrepancies. For example, Bitcoin prices may have up to 8 decimal places, and some altcoins even more. Without a DECIMAL type, it's challenging to manage this data accurately in TDengine. Implementing this feature would significantly expand TDengine's applicability in financial sectors and increase its competitive edge against databases like MySQL, which already provide this capability.
Is your feature request related to a problem? Please describe.
I'm using TDengine to store and analyze large-scale cryptocurrency data. My use case involves tracking and calculating financial metrics like cryptocurrency prices, transaction amounts, and market capitalizations, which require extremely high precision. However, I am always frustrated when I encounter inaccuracies due to the limitations of the
FLOAT
data type in TDengine. The lack of aDECIMAL
data type to handle large numbers with fine precision makes it difficult to accurately represent financial data, leading to potential rounding errors and imprecise calculations.Describe your desired behavior
I want TDengine to support a
DECIMAL
data type, similar to MySQL'sDECIMAL(p,s)
, which would allow me to store and process numbers with high precision and large scale (e.g.,DECIMAL(40,18)
). This would enable TDengine to accurately handle financial data, ensuring that calculations involving cryptocurrencies and other financial metrics are precise and reliable.Describe your solutions/suggestions if you've any
I suggest implementing a
DECIMAL
data type within TDengine that supports user-defined precision and scale. This data type should use fixed-point arithmetic to avoid the inaccuracies inherent in floating-point representations. The flexibility to define precision (e.g., 40 digits) and scale (e.g., 18 decimal places) would make TDengine a powerful tool for financial applications, allowing for accurate storage and computation of values like cryptocurrency prices, trading volumes, and market capitalizations.Additional context
In the cryptocurrency industry, precision is non-negotiable. A minor error in representing a value could lead to significant financial discrepancies. For example, Bitcoin prices may have up to 8 decimal places, and some altcoins even more. Without a
DECIMAL
type, it's challenging to manage this data accurately in TDengine. Implementing this feature would significantly expand TDengine's applicability in financial sectors and increase its competitive edge against databases like MySQL, which already provide this capability.