Skip to content

The error result of decimal agg #1225

@EmmyMiao87

Description

@EmmyMiao87

Describe the bug
The result of decimal agg is error when stream load.

To Reproduce
Steps to reproduce the behavior:

  1. make a file with two column "1 123456789012345678.123456789" "1 123456789012345678.123456789"
  2. create a table with a decimal column which is a sum agg column
    CREATE TABLE sum_decimal( tinyint_keytinyint(4) NOT NULL COMMENT "", decimal_most_value decimal(27, 9) SUM NOT NULL COMMENT "" ) ENGINE=OLAP AGGREGATE KEY(tinyint_key) DISTRIBUTED BY HASH(tinyint_key) BUCKETS 1 PROPERTIES ( "storage_type" = "COLUMN" );
  3. insert file into table using stream load
  4. show result of stream load
    +-------------+------------------------------+
    | tinyint_key | decimal_most_value |
    +-------------+------------------------------+
    | 1 | 246913578024691355.999999999 |
    +-------------+------------------------------+

Expected behavior
the result of load is following:
+-------------+------------------------------+
| tinyint_key | decimal_most_value |
+-------------+------------------------------+
| 1 | 246913578024691356.246913578 |
+-------------+------------------------------+

Screenshots
The old broker load and mini load have the correct result while stream load and new broker load have the incorrect result. So the problem must be happened in agg of olap engine instead of agg of dpp sink.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions