EmmyMiao87 commented on issue #1650: Where clause can't push down into the 
right table of JOIN clasure
URL: 
https://github.com/apache/incubator-doris/issues/1650#issuecomment-521538908
 
 
   The where predicate could not be pushed down when the predicate is on the 
outer join table.
   For example: `select * from a left join b on a.id=b.id where b.id=1;` 
   In some cases, the predicate could be pushed down.
   In impala, for example:  
   Query: explain select * from customer_address a left join customer_address b 
on a.ca_address_sk=b.ca_address_sk where b.ca_address_sk=1
   
+------------------------------------------------------------------------------------+
   | Explain String                                                             
        |
   
+------------------------------------------------------------------------------------+
   | Estimated Per-Host Requirements: Memory=0B VCores=2                        
        |
   | WARNING: The following tables are missing relevant table and/or column 
statistics. |
   | tpcds_hive.customer_address                                                
        |
   |                                                                            
        |
   | PLAN-ROOT SINK                                                             
        |
   | |                                                                          
        |
   | 04:EXCHANGE [UNPARTITIONED]                                                
        |
   | |                                                                          
        |
   | 02:HASH JOIN [LEFT OUTER JOIN, BROADCAST]                                  
        |
   | |  hash predicates: a.ca_address_sk = b.ca_address_sk                      
        |
   | |  other predicates: b.ca_address_sk = 1                                   
        |
   | |                                                                          
        |
   | |--03:EXCHANGE [BROADCAST]                                                 
        |
   | |  |                                                                       
        |
   | |  01:SCAN HDFS [tpcds_hive.customer_address b]                            
        |
   | |     partitions=1/1 files=0 size=0B                                       
        |
   | |     predicates: b.ca_address_sk = 1                                      
        |
   | |                                                                          
        |
   | 00:SCAN HDFS [tpcds_hive.customer_address a]                               
        |
   |    partitions=1/1 files=0 size=0B                                          
        |
   
+------------------------------------------------------------------------------------+

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to