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

   ### 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
   
   1.2.8
   
   ### What's Wrong?
   
   below is the steps to reproduce this issue 
   1, create table as following
   CREATE TABLE `ad_order_data` (
     `pin_id` bigint(20) NOT NULL COMMENT '广告主pin_id',
     `date_time` datetime NOT NULL COMMENT '点击时间',
     `order_day` datetime NOT NULL COMMENT '下单时间yyyy-MM-dd HH:mm:ss',
     `campaign_id` bigint(20) NOT NULL COMMENT '计划ID',
     `group_id` bigint(20) NOT NULL COMMENT '单元ID',
     `activity_id` int NOT NULL COMMENT '联合活动-活动id',
     `docnt` bigint(20) SUM NULL DEFAULT "0" COMMENT '直接订单行量',
     `dogmv` bigint(20) SUM NULL DEFAULT "0" COMMENT '直接订单金额'
   ) ENGINE=OLAP
   AGGREGATE KEY(`pin_id`, `date_time`, `order_day`, `campaign_id`, `group_id`, 
`activity_id`)
   COMMENT 'OLAP'
   PARTITION BY RANGE(`order_day`)
   (
   PARTITION p202311 VALUES [('2023-11-01 00:00:00'), ('2023-12-01 00:00:00')),
   PARTITION p202312 VALUES [('2023-12-01 00:00:00'), ('2024-01-01 00:00:00')),
   PARTITION p202401 VALUES [('2024-01-01 00:00:00'), ('2024-02-01 00:00:00')),
   PARTITION p202402 VALUES [('2024-02-01 00:00:00'), ('2024-03-01 00:00:00')),
   PARTITION p202403 VALUES [('2024-03-01 00:00:00'), ('2024-04-01 00:00:00')),
   PARTITION p202404 VALUES [('2024-04-01 00:00:00'), ('2024-05-01 00:00:00')),
   PARTITION p202405 VALUES [('2024-05-01 00:00:00'), ('2024-06-01 00:00:00')),
   PARTITION p202406 VALUES [('2024-06-01 00:00:00'), ('2024-07-01 00:00:00')),
   PARTITION p202407 VALUES [('2024-07-01 00:00:00'), ('2024-08-01 00:00:00')),
   PARTITION p202408 VALUES [('2024-08-01 00:00:00'), ('2024-09-01 00:00:00')))
   DISTRIBUTED BY HASH(`pin_id`) BUCKETS 16
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "dynamic_partition.enable" = "true",
   "dynamic_partition.time_unit" = "MONTH",
   "dynamic_partition.time_zone" = "Asia/Shanghai",
   "dynamic_partition.start" = "-2147483648",
   "dynamic_partition.end" = "5",
   "dynamic_partition.prefix" = "p",
   "dynamic_partition.replication_allocation" = "tag.location.default: 1",
   "dynamic_partition.buckets" = "16",
   "dynamic_partition.create_history_partition" = "false",
   "dynamic_partition.history_partition_num" = "-1",
   "dynamic_partition.hot_partition_num" = "0",
   "dynamic_partition.reserved_history_periods" = "NULL",
   "dynamic_partition.storage_policy" = "",
   "dynamic_partition.storage_medium" = "HDD",
   "dynamic_partition.start_day_of_month" = "1",
   "in_memory" = "false",
   "storage_format" = "V2",
   "disable_auto_compaction" = "false"
   );
   
   2, start mysqlslap shell to insert into the table with following data
   insert into ad_order_data values(1, "2024-01-01 00:00:00", "2024-01-01 
00:00:00", 1, 1, 1, 1, 1);
   
   3, during the inserting, we make a schema change as following
   ALTER TABLE ad_order_data MODIFY COLUMN `activity_id` BIGINT KEY NULL 
COMMENT "联合活动-引流活动id"  AFTER `order_day` PROPERTIES ("timeout"="604800")
   
   4, now  select * from ad_order_data we will get some incorrect data with 
activity_id="569706456668962817":
   
+--------+---------------------+--------------------+---------------------+-------------+----------+-------+-------+
   | pin_id | date_time           | activity_id        | order_day           | 
campaign_id | group_id | docnt | dogmv |
   
+--------+---------------------+--------------------+---------------------+-------------+----------+-------+-------+
   |      1 | 2024-01-01 00:00:00 |                  1 | 2024-01-01 00:00:00 |  
         1 |        1 | 10364 | 10364 |
   |      1 | 2024-01-01 00:00:00 | 569706456668962817 | 2024-01-01 00:00:00 |  
         1 |        1 |    14 |    14 |
   
+--------+---------------------+--------------------+---------------------+-------------+----------+-------+-------+
   
   ### What You Expected?
   
   expect only return the data with activity_id=1
   
   ### How to Reproduce?
   
   refer to what's  wrong
   
   ### Anything Else?
   
   seems resolved in doris 2.0.6.  
   
   ### Are you willing to submit PR?
   
   - [ ] 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to