-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
Strange count distinct/group by on json field behavior #369
Comments
In addition, the group by behaves differently on Sphinx3/Manticore compared to Sphinx2 (We are not able to reproduce it on a small basis appropriate for this scope and it is blocked by this issue) Please give us a note, if you need a separate issue for this. Sphinx2:
Sphinx3
|
|
Simpler reproducible case for the wrong COUNT(DISTINCT). create table t(f text, j json);
insert into t(id,j) values(1,'{"id":6}');
insert into t(id,j) values(2,'{"id":7}');
select j.id i, count(distinct i) from t;
+------+-------------------+
| i | count(distinct i) |
+------+-------------------+
| 7 | 1 |
+------+-------------------+
1 row in set (0.00 sec)
mysql> FLUSH RAMCHUNK t;
Query OK, 0 rows affected (0.05 sec)
mysql> select j.id i, count(distinct i) from t;
+------+-------------------+
| i | count(distinct i) |
+------+-------------------+
| 7 | 2 |
+------+-------------------+
1 row in set (0.00 sec) If I insert the both documents in the same batch it's also fine. |
➤ Ilya Kuznetsov commented: Fixed count(distinct) on json attributes in 9bc5c01 |
Describe the environment
Manticore Search version (top line in output of
bin/searchd -v
orbin/indexer -v
):Manticore 3.4.3 2e1484c@200701 release
OS version (
uname -a
if on a Unix-like system):Linux 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Describe the problem:
The count distinct/group by result on a JSON/Data field returns wrong results
Steps to reproduce:
We're usually expect the distinct count return 2, but it returns 1
The text was updated successfully, but these errors were encountered: