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

   ### 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
   
   3.x/2.x
   
   ### What's Wrong?
   
   MTMV refresh failed after base table schema change:
   ```column type not same, please check whether columns of base table have 
changed, column name is: k2, original type is: varchar(20), current type is: 
int```
   
   ### What You Expected?
   
   refresh successfully
   
   ### How to Reproduce?
   
   ```
   1. create test table:
   > CREATE TABLE `test_base` (
     `k1` int NULL,
     `k2` varchar(20) NULL,
     `v1` int NULL,
     `v2` int NULL
   ) ENGINE=OLAP
   DUPLICATE KEY(`k1`, `k2`);
   
   2. insert test data
   > insert into test_base values(1,2,3,4);
   
   3. create async mv:
   > CREATE MATERIALIZED VIEW test_mv BUILD IMMEDIATE REFRESH AUTO ON SCHEDULE 
EVERY 1 MINUTE AS select * from test_base;
   
   > select * from tasks("type"="mv");
   
+------------------+---------------+--------------------------+---------------+---------+---------------+----------------+---------+----------+---------------------+---------------------+---------------------+------------+---------------------------------------------+-------------+-----------------------+---------------------+---------------+-----------------------------------+
   | TaskId           | JobId         | JobName                  | MvId         
 | MvName  | MvDatabaseId  | MvDatabaseName | Status  | ErrorMsg | CreateTime   
       | StartTime           | FinishTime          | DurationMs | TaskContext   
                              | RefreshMode | NeedRefreshPartitions | 
CompletedPartitions | Progress      | LastQueryId                       |
   
+------------------+---------------+--------------------------+---------------+---------+---------------+----------------+---------+----------+---------------------+---------------------+---------------------+------------+---------------------------------------------+-------------+-----------------------+---------------------+---------------+-----------------------------------+
   | 1348636384608302 | 1752722790394 | inner_mtmv_1752722790352 | 
1752722790352 | test_mv | 1752722789440 | example_db     | SUCCESS |          | 
2025-07-23 13:00:51 | 2025-07-23 13:00:51 | 2025-07-23 13:00:51 | 49         | 
{"triggerMode":"SYSTEM","isComplete":false} | COMPLETE    | ["test_mv"]         
  | ["test_mv"]         | 100.00% (1/1) | e9705d4767a1462c-be169cc7326158c7 |
   
+------------------+---------------+--------------------------+---------------+---------+---------------+----------------+---------+----------+---------------------+---------------------+---------------------+------------+---------------------------------------------+-------------+-----------------------+---------------------+---------------+-----------------------------------+
   
   4. alter column
   > alter table test_base modify column k2 int key;
   
   5. check refresh task:
   > refresh materialized view test_mv auto;
   
   > select * from tasks("type"="mv");
   
+------------------+---------------+--------------------------+---------------+---------+---------------+----------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+---------------------+------------+-------------------------------------------------------------+-------------+-----------------------+---------------------+---------------+-----------------------------------+
   | TaskId           | JobId         | JobName                  | MvId         
 | MvName  | MvDatabaseId  | MvDatabaseName | Status  | ErrorMsg                
                                                                                
                                               | CreateTime          | 
StartTime           | FinishTime          | DurationMs | TaskContext            
                                     | RefreshMode | NeedRefreshPartitions | 
CompletedPartitions | Progress      | LastQueryId                       |
   
+------------------+---------------+--------------------------+---------------+---------+---------------+----------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+---------------------+------------+-------------------------------------------------------------+-------------+-----------------------+---------------------+---------------+-----------------------------------+
   | 1348636384608302 | 1752722790394 | inner_mtmv_1752722790352 | 
1752722790352 | test_mv | 1752722789440 | example_db     | SUCCESS |            
                                                                                
                                                            | 2025-07-23 
13:00:51 | 2025-07-23 13:00:51 | 2025-07-23 13:00:51 | 49         | 
{"triggerMode":"SYSTEM","isComplete":false}                 | COMPLETE    | 
["test_mv"]           | ["test_mv"]         | 100.00% (1/1) | 
e9705d4767a1462c-be169cc7326158c7 |
   | 1348696757560301 | 1752722790394 | inner_mtmv_1752722790352 | 
1752722790352 | test_mv | 1752722789440 | example_db     | FAILED  | column 
type not same, please check whether columns of base table have changed, column 
name is: k2, original type is: varchar(20), current type is: int | 2025-07-23 
13:01:52 | 2025-07-23 13:01:52 | \N                  | \N         | 
{"triggerMode":"SYSTEM","isComplete":false}                 | \N          | \N  
                  | \N                  | \N            |                       
            |
   | 1348717481522911 | 1752722790394 | inner_mtmv_1752722790352 | 
1752722790352 | test_mv | 1752722789440 | example_db     | FAILED  | column 
type not same, please check whether columns of base table have changed, column 
name is: k2, original type is: varchar(20), current type is: int | 2025-07-23 
13:02:14 | 2025-07-23 13:02:14 | \N                  | \N         | 
{"triggerMode":"MANUAL","partitions":[],"isComplete":false} | \N          | \N  
                  | \N                  | \N            |                       
            |
   
+------------------+---------------+--------------------------+---------------+---------+---------------+----------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+---------------------+------------+-------------------------------------------------------------+-------------+-----------------------+---------------------+---------------+-----------------------------------+
   
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### 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: 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