-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
INNER/LEFT JOIN #1673
Comments
Little issue with NULLs in No NULL for the last column here:
If I replace the text field with another int it becomes ok:
|
Done in #1855 even with proper NULL support for What's left is to document it along with the following nuances:
|
Fixed in 25d99ef |
A new error has been detected. Sorting in
Sorting in
|
Fixed in de6dac0 |
I confirm that sorting by id asc works, regardless of whether engine='columnar' is used.
|
What exactly random data do you mean? The |
@glookka Crash in:
based on the Pavel's MRE with a little bit different query: mysql> DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1 (id bigint, name text, surname text); INSERT INTO t1 (id, name, surname) VALUES (1, 'name1', 'surname1'), (2, 'name2', 'surname2');
select * from t1; CREATE TABLE t2 (id bigint, t2_id bigint, name text, description text, attr json); INSERT INTO t2 (id, t2_id, name, description, attr) VALUES (0, 1, 'name1', 'description1', '{"color":"black","size":14}'), (0, 1, 'name2', 'description2', '{"color":"black","size":14}'); select * from t2; select id, *, count(*), groupby() from t1 inner join t2 on t1.id=t2.t2_id group by t2.attr.color, t2.attr.size order by id asc;
--------------
DROP TABLE IF EXISTS t1
--------------
Query OK, 0 rows affected (0.01 sec)
--------------
DROP TABLE IF EXISTS t2
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
CREATE TABLE t1 (id bigint, name text, surname text)
--------------
Query OK, 0 rows affected (0.01 sec)
--------------
INSERT INTO t1 (id, name, surname) VALUES (1, 'name1', 'surname1'), (2, 'name2', 'surname2')
--------------
Query OK, 2 rows affected (0.00 sec)
--------------
select * from t1
--------------
+------+-------+----------+
| id | name | surname |
+------+-------+----------+
| 1 | name1 | surname1 |
| 2 | name2 | surname2 |
+------+-------+----------+
2 rows in set (0.00 sec)
--- 2 out of 2 results in 0ms ---
--------------
CREATE TABLE t2 (id bigint, t2_id bigint, name text, description text, attr json)
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
INSERT INTO t2 (id, t2_id, name, description, attr) VALUES (0, 1, 'name1', 'description1', '{"color":"black","size":14}'), (0, 1, 'name2', 'description2', '{"color":"black","size":14}')
--------------
Query OK, 2 rows affected (0.00 sec)
--------------
select * from t2
--------------
+---------------------+-------+--------------+-------+-----------------------------+
| id | name | description | t2_id | attr |
+---------------------+-------+--------------+-------+-----------------------------+
| 5839241405892919297 | name1 | description1 | 1 | {"color":"black","size":14} |
| 5839241405892919298 | name2 | description2 | 1 | {"color":"black","size":14} |
+---------------------+-------+--------------+-------+-----------------------------+
2 rows in set (0.00 sec)
--- 2 out of 2 results in 0ms ---
--------------
select id, *, count(*), groupby() from t1 inner join t2 on t1.id=t2.t2_id group by t2.attr.color, t2.attr.size order by id asc
--------------
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 104
ERROR:
Can't connect to the server |
I filled the table with data. However, as a result of the query |
Pls read in the docs about groupby(). It's a hash, it can't exist in the table. But the point that the hash values are different for seemingly identical rows looks wrong. |
This task is done to some extent. The functionality has been released in beta stage in 6.3.0. The docs can be found here https://manual.manticoresearch.com/Searching/Joining |
The task is to implement INNER/LEFT JOIN functionality with the following limitations:
The text was updated successfully, but these errors were encountered: