matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.71k stars 265 forks source link

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

Open arjunsk opened 1 month ago

arjunsk commented 1 month ago

Is there an existing issue for the same bug?

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

aunjgr commented 1 month ago

not working on it today

aressu1985 commented 1 month ago

经和龙冉沟通,可以在1.2.1版本周期内解决

aunjgr commented 3 weeks ago

not working on it today

aunjgr commented 2 weeks ago

not working on it today

aunjgr commented 2 weeks ago

not working on it today

aunjgr commented 1 week ago

not working on it today

aunjgr commented 5 days ago

not working on it today