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 returns incorrect results when used with multiple facets #2242

Closed
8 tasks done
glookka opened this issue May 28, 2024 · 1 comment
Closed
8 tasks done

JOIN returns incorrect results when used with multiple facets #2242

glookka opened this issue May 28, 2024 · 1 comment
Labels

Comments

@glookka
Copy link
Contributor

glookka commented May 28, 2024

Bug Description:

JOIN returns incorrect result when used with multiple facets:

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 );
create table join2 ( id bigint, title text, name string attribute, j json );

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

insert into join2 values (1, 'title1', 'name1', '{"a":1,"table":"join2"}');
insert into join2 values (2, 'title2', 'name2', '{"b":2,"table":"join2"}');
mysql> select join1.j.table, j.table from join2 join join1 on join1.id = join2.id facet join1.j.table distinct facet j.table;
Empty set (4 min 39.87 sec)
--- 0 out of 0 results in 0m 0.1s ---

+---------------+--------------------+----------+
| join1.j.table | count(distinct id) | count(*) |
+---------------+--------------------+----------+
| join1         |                  2 |        2 |
|               |                  2 |        2 |
+---------------+--------------------+----------+
2 rows in set
--- 2 out of 2 results in 1m 33.3s ---

+---------+----------+
| j.table | count(*) |
+---------+----------+
| join2   |        4 |
+---------+----------+
1 row in set

Main query does not any results and facet query has an empty entry.

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.

  • Task estimated
  • Specification created, reviewed, and approved
  • Implementation completed
  • Tests developed
  • Documentation updated
  • Documentation proofread
  • Changelog updated
@glookka glookka added the bug label May 28, 2024
@glookka
Copy link
Contributor Author

glookka commented May 28, 2024

Fixed in 997bab9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants