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

   ### 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
   
   master
   
   ### What's Wrong?
   
   At present, Nereids will fail to execute the insert into select statement, 
and mistakenly consider the columns in the materialized view as complete 
columns, resulting in an error when directly inserting data.
   eg.
   ```
               create table agg_have_dup_base(
                   k1 int null,
                   k2 int not null,
                   k3 bigint null,
                   k4 varchar(100) null
               )
               duplicate key (k1,k2,k3)
               distributed BY hash(k1) buckets 3
               properties("replication_num" = "1");
   
   create materialized view k12s3m as select k1,sum(k2),max(k2) from 
agg_have_dup_base group by k1;
   
   insert into agg_have_dup_base select -4,-4,-4,'d';
   ```
   ERROR
   ```
   Exception:
   java.sql.SQLException: IllegalArgumentException, msg: insert target table 
contains 7 slots, but source table contains 4 slots
   ```
   ```
   regression-test/suites/nereids_syntax_p0/mv/newMv 
   ```
   All tests in this directory have this problem.
   
   ### What You Expected?
   
   Inserted successfully
   
   ### How to Reproduce?
   
   _No response_
   
   ### 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