Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join issue when filtering by columnar attributes #2342

Closed
5 tasks done
glookka opened this issue Jun 27, 2024 · 1 comment
Closed
5 tasks done

Join issue when filtering by columnar attributes #2342

glookka opened this issue Jun 27, 2024 · 1 comment

Comments

@glookka
Copy link
Contributor

glookka commented Jun 27, 2024

Bug Description:

Join does not return results if using columnar storage and filtering by an attribute which is not in the select list:

drop table if exists join1;
drop table if exists join2;

create table join1 ( id bigint, title text, string_id integer, tmp string attribute, j json ) engine='columnar';
create table join2 ( id bigint, title text, string_id integer, name string attribute engine='columnar', j json );

insert into join1 values (1, 'title1', 1, 'tmp1', '{"sort":5,"a":1,"table":"join1"}');
insert into join1 values (2, 'title2', 2, 'tmp2', '{"sort":6,"b":2,"table":"join1"}');
insert into join1 values (3, 'title3', 3, 'tmp3', '{"sort":7,"c":3,"table":"join1"}');
insert into join1 values (4, 'title4', 4, 'tmp4', '{"sort":8,"d":4,"table":"join1"}');

insert into join2 values (1, 'title1', 1, 'name1', '{"sort":10,"a":1,"table":"join2"}');
insert into join2 values (2, 'title2', 2, 'name2', '{"sort":5,"b":2,"table":"join2"}');

-- when filtering on a value from the second table of a left join no results are
-- returned, despite one matching entry
select uint(join2.j.sort) as table2, weight() * (j.sort + table2) as test2
from join1 left join join2 on join1.string_id = join2.string_id
where join2.name = 'name2'
order by test2 desc;

Manticore Search Version:

6.3.1

Operating System Version:

Any

Have you tried the latest development version?

Yes

Internal Checklist:

To be completed by the assignee. Check off tasks that have been completed or are not applicable.

  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation reviewed
  • Changelog updated
@glookka glookka added the bug label Jun 27, 2024
@glookka
Copy link
Contributor Author

glookka commented Jun 27, 2024

Fixed in 70daf7d

@glookka glookka closed this as completed Jun 27, 2024
@sanikolaev sanikolaev added rel::6.3.4 and removed rel::upcoming Upcoming release labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants