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

[BUG] Self join doesn't work properly #277

Open
Yury-Fridlyand opened this issue Nov 9, 2021 · 1 comment
Open

[BUG] Self join doesn't work properly #277

Yury-Fridlyand opened this issue Nov 9, 2021 · 1 comment
Labels
enhancement New feature or request SQL tdvt Tableau test framework

Comments

@Yury-Fridlyand
Copy link
Collaborator

Describe the bug
Self join doesn't work properly.

To Reproduce

opensearchsql> SELECT c1.`key`, c1.num1, c2.str0 FROM calcs AS c1, calcs AS c2;
fetched rows / total rows = 17/17
+----------+-----------+-----------+
| c1.key   | c1.num1   | c2.str0   |
|----------+-----------+-----------|
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
| null     | null      | null      |
+----------+-----------+-----------+
opensearchsql> SELECT c1.`key`, c1.num1, c1.str0 FROM calcs AS c1;
fetched rows / total rows = 17/17
+-------+--------+-----------------+
| key   | num1   | str0            |
|-------+--------+-----------------|
| key00 | 8.42   | FURNITURE       |
| key01 | 6.71   | FURNITURE       |
| key02 | 9.78   | OFFICE SUPPLIES |
| key03 | 7.43   | OFFICE SUPPLIES |
| key04 | 9.05   | OFFICE SUPPLIES |
| key05 | 9.38   | OFFICE SUPPLIES |
| key06 | 16.42  | OFFICE SUPPLIES |
| key07 | 11.38  | OFFICE SUPPLIES |
| key08 | 9.47   | TECHNOLOGY      |
| key09 | 12.4   | TECHNOLOGY      |
| key10 | 10.32  | TECHNOLOGY      |
| key11 | 2.47   | TECHNOLOGY      |
| key12 | 12.05  | TECHNOLOGY      |
| key13 | 10.37  | TECHNOLOGY      |
| key14 | 7.1    | TECHNOLOGY      |
| key15 | 16.81  | TECHNOLOGY      |
| key16 | 7.12   | TECHNOLOGY      |
+-------+--------+-----------------+

Expected behavior
First query should yield the same result as the second one.

@Yury-Fridlyand Yury-Fridlyand added Beta bug Something isn't working untriaged labels Nov 9, 2021
@chloe-zh
Copy link
Contributor

@Yury-Fridlyand Thanks for reporting this issue, currently our syntax does not support self join yet. Will investigate and plan it if the support is necessary. Thanks!

@chloe-zh chloe-zh added SQL enhancement New feature or request and removed bug Something isn't working Beta untriaged labels Nov 11, 2021
@joshuali925 joshuali925 added the tdvt Tableau test framework label Nov 24, 2021
MaxKsyunz pushed a commit that referenced this issue Jul 11, 2023
* Add _routing to SQL includes list

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update IT index

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update doctest

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Add WHERE clause IT tests

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Fix IT test

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Update documentation for _routing

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
opensearch-trigger-bot bot pushed a commit that referenced this issue Jul 11, 2023
* Add _routing to SQL includes list

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update IT index

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update doctest

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Add WHERE clause IT tests

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Fix IT test

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Update documentation for _routing

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 876a9c8)
penghuo pushed a commit that referenced this issue Jul 11, 2023
* Add _routing to SQL includes list

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update IT index

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update doctest

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Add WHERE clause IT tests

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Fix IT test

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Update documentation for _routing

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 876a9c8)

Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
opensearch-trigger-bot bot pushed a commit that referenced this issue Jul 11, 2023
* Add _routing to SQL includes list

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update IT index

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update doctest

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Add WHERE clause IT tests

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Fix IT test

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Update documentation for _routing

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 876a9c8)
Yury-Fridlyand pushed a commit that referenced this issue Jul 11, 2023
* Add _routing to SQL includes list

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update IT index

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>

* Update doctest

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Add WHERE clause IT tests

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Fix IT test

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

* Update documentation for _routing

Signed-off-by: acarbonetto <andrewc@bitquilltech.com>

---------

Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
(cherry picked from commit 876a9c8)

Co-authored-by: Andrew Carbonetto <andrewc@bitquilltech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SQL tdvt Tableau test framework
Projects
None yet
Development

No branches or pull requests

3 participants