xingyingone opened a new issue, #23775:
URL: https://github.com/apache/doris/issues/23775

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   SHA-1: 97eb2b91726ca24622c20c20fb1ab5b9e1c85559
   
   ### What's Wrong?
   
      CREATE TABLE `test_array_agg_decimal` (
           `id` int(11) NOT NULL,
           `label_name` varchar(32) default null,
           `value_field` string default null,
           `age` int(11) default null,
            `o_totalprice` DECIMAL(15, 2) default NULL
       ) ENGINE=OLAP
       DUPLICATE KEY(`id`)
       COMMENT 'OLAP'
       DISTRIBUTED BY HASH(`id`) BUCKETS 1
       PROPERTIES (
       "replication_allocation" = "tag.location.default: 1",
       "storage_format" = "V2",
       "light_schema_change" = "true",
       "disable_auto_compaction" = "false",
       "enable_single_replica_compaction" = "false"
       );
       
           insert into `test_array_agg_decimal` values
   (1, "alex",NULL,NULL,NULL),
   (1, "LB", "V1_2",1,NULL),
   (1, "LC", "V1_3",2,1.11),
   (2, "LA", "V2_1",4,1.23),
   (2, "LB", "V2_2",5,NULL),
   (2, "LC", "V2_3",5,1.21),
   (3, "LA", "V3_1",6,1.21),
   (3, NULL, NULL,6,1.23),
   (3, "LC", "V3_3",NULL,1.24),
   (4, "LA", "V4_1",5,1.22),
   (4, "LB", "V4_2",6,NULL),
   (4, "LC", "V4_3",6,1.22),
   (5, "LA", "V5_1",6,NULL),
   (5, "LB", "V5_2",5,NULL),
   (5, "LC", "V5_3",NULL,NULL),
   (7, "", NULL,NULL,NULL),
   (8, "", NULL,0,NULL);
   
   mysql>  select id,map_agg(id,o_totalprice) from test_array_agg_decimal group 
by id;
   +------+-------------------------------+
   | id   | map_agg(`id`, `o_totalprice`) |
   +------+-------------------------------+
   |    1 | {1:111}                       |
   |    2 | {2:121}                       |
   |    3 | {3:124}                       |
   |    4 | {4:122}                       |
   |    5 | {5:NULL}                      |
   |    7 | {7:NULL}                      |
   |    8 | {8:NULL}                      |
   +------+-------------------------------+
   7 rows in set (5.92 sec)
   
   
   ### What You Expected?
   
   Some aggregation functions such as map agg may drop the decimal point
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   no
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to