[MCOL-4902] Views disable certain outer join optimization Created: 2021-10-21  Updated: 2023-11-17  Resolved: 2022-07-28

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 6.1.1
Fix Version/s: 22.08.1

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: Denis Khalikov
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MCOL-1205 support queries with circular INNER j... Closed
relates to MCOL-4699 support queries with circular OUTER j... Closed
Sprint: 2021-17
Assigned for Testing: Daniel Lee Daniel Lee (Inactive)

 Description   

A Variant from MCOL-1205 , it works not, if in the from clause is a view.

To reproduce:

drop table if exists t1,t2;
create table t1 (i int) engine=columnstore;
create table t2 (i int) engine=columnstore;
drop view if exists v1;
CREATE VIEW v1 AS select t1.* from t1 left join t2 on t1.i = t2.i;
 
select * from t1
 join t2 on t1.i = t2.i
 join v1 on t2.i = v1.i 
and t1.i = v1.i;
# trigger circular join error
 
 
select * from t1 join t2 on t1.i = t2.i join v1 on t2.i = v1.i ;
works normal 



 Comments   
Comment by Denis Khalikov [ 2022-07-15 ]

MCOL-4699 fixes this PR.

Comment by Daniel Lee (Inactive) [ 2022-07-28 ]

Build verified: 22.08-1 (#5108)

Reproduced the issue in 6.4.2-1 and verified that it works in 22.08-1. Also verified query result matched the same test using innodb tables.

Generated at Thu Feb 08 02:53:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.