Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using CarbonData/ CarbonData FAQ/ Why Is Incorrect Output Displayed When I Perform Query with Filter on Decimal Data Type Values?

Why Is Incorrect Output Displayed When I Perform Query with Filter on Decimal Data Type Values?

Updated on 2022-11-18 GMT+08:00

Question

Why is incorrect output displayed when I perform query with filter on decimal data type values?

For example:

select * from carbon_table where num = 1234567890123456.22;

Output:

+------+---------------------+--+
| name |        num          |
+------+---------------------+--+
| IAA  | 1234567890123456.22 |
| IAA  | 1234567890123456.21 |
+------+---------------------+--+

Answer

To obtain accurate output, append BD to the number.

For example:

select * from carbon_table where num = 1234567890123456.22BD;

Output:

+------+---------------------+--+
| name |        num          |
+------+---------------------+--+
| IAA  | 1234567890123456.22 |
+------+---------------------+--+
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback