seawinde opened a new pull request, #32797:
URL: https://github.com/apache/doris/pull/32797

   ## Proposed changes
   
   Support to get tables in materialized view when collecting table in plan
   
   table scehma as fllowing:
   ```
   create materialized view mv1 BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL 
DISTRIBUTED BY RANDOM BUCKETS 1  PROPERTIES ('replication_num' = '1')
    as 
   select 
     t1.c1, 
     t3.c2 
   from 
     table1 t1 
     inner join table3 t3 on t1.c1 = t3.c2
   ```
   if get table from the plan as follwoing, we can get **[table1, table3, 
table2]**, the **mv1** is expanded to get base tables;
   ```
   SELECT 
     mv1.*, 
     uuid() 
   FROM 
     mv1 LEFT SEMI 
     JOIN table2 ON mv1.c1 = table2.c1 
   WHERE 
     mv1.c1 IN (
       SELECT 
         c1 
       FROM 
         table2
     ) 
     OR mv1.c1 < 10
   ```
   
   
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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