[ 
https://issues.apache.org/jira/browse/IMPALA-14436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18063409#comment-18063409
 ] 

Steve Carlin commented on IMPALA-14436:
---------------------------------------

The following test fails within overlap_min_max_filters.test:



 
{code:java}
---- QUERY
# Positive tests to check out the explain output involving a non-correlated 
one-row
# sub-query. Expect to see a min/max filter at the nested join for an inequality
# predicate between a column and the subquery.
# DECIMAL data type.
set minmax_filtering_level=page;
set minmax_filter_threshold=0.9;
set explain_level=3;
explain select count(*) from tpcds_parquet.store_sales
where ss_sales_price < (select min(ss_wholesale_cost) from 
tpcds_parquet.store_sales);
---- RESULTS: VERIFY_IS_SUBSET
row_regex:.* RF000\[min_max\] <- min\(.*ss_wholesale_cost\).*
row_regex:.* RF000\[min_max\] -> .*ss_sales_price.*
{code}
 

The produces the following JoinNode:


 
{code:java}
| 03:NESTED LOOP JOIN [INNER JOIN, BROADCAST]                                   
                                    |
| |  join predicates: tpcds_parquet.store_sales.ss_sales_price < 
min(tpcds_parquet.store_sales_0.ss_wholesale_cost) |
| |  row-size=8B cardinality=2.75M    
{code}
  Note the explain line says "join predicates"
For this to produce the runtime filter, the JoinNode needs to look like this:


 
{code:java}
| 03:NESTED LOOP JOIN [INNER JOIN, BROADCAST]                                   
                               |
| |  predicates: tpcds_parquet.store_sales.ss_sales_price < 
min(tpcds_parquet.store_sales_0.ss_wholesale_cost) |
| |  row-size=8B cardinality=2.75M    
{code}
 

 

 

> Calcite Planner: Implement single row join optimization
> -------------------------------------------------------
>
>                 Key: IMPALA-14436
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14436
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: Steve Carlin
>            Priority: Major
>
> Impala has special code to handle joins that produce one row on the right 
> side. This needs to be implemented in Calcite



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to