matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: Optimizer doesn't support ProjectList in SEMI Join

Open arjunsk opened this issue 9 months ago • 26 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Branch Name

main

Commit ID

e4c504a606585cb373a5bb7c452e804469716610

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

explain analyze select a from tbl order by l2_distance(b, "[1,1,1]") limit 3;
SQL Error [1064] [42000]: SQL parser error: can't find column [11 2] in context's map { [10 3] }

Expected Behavior

Output Query Plan

Steps to Reproduce

  1. Build the project with these changes https://github.com/arjunsk/matrixone/pull/90/files

  2. Run the SQL

create database a;
use a;
create table tbl(a int primary key, b vecf32(3));
insert into tbl values(1, "[1,2,3]");
insert into tbl values(2, "[1,2,4]");
insert into tbl values(3, "[1,2.4,4]");
insert into tbl values(4, "[1,2,5]");
insert into tbl values(5, "[1,3,5]");
insert into tbl values(6, "[100,44,50]");
insert into tbl values(7, "[100,44,50]");
insert into tbl values(8, "[130,40,90]");
SET GLOBAL experimental_ivf_index = 1;
create index idx using ivfflat on tbl(b) lists=2 op_type "vector_l2_ops";
explain analyze select a from tbl order by l2_distance(b, "[1,1,1]") limit 3;
SQL Error [1064] [42000]: SQL parser error: can't find column [11 2] in context's map { [10 3] }

Additional information

No response

arjunsk avatar May 26 '24 04:05 arjunsk