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

Fix double lookup failure on ESQL #115616

Merged
merged 5 commits into from
Nov 22, 2024

Conversation

jackpan123
Copy link
Contributor

Fix double lookup failure on ESQL (Closes #111398 ).
I also try three times LOOKUP, it is fine, result like below:

 curl -XPOST "http://localhost:9200/_query?format=txt" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'                                                                                                                                                                   ─╯
{
    "query": "from test | lookup test2 on foo | lookup test3 on foo | lookup test4 on foo",
    "tables": {
        "test2": {
            "foo": {"keyword": ["bar"]},
            "field21": {"long": [123]},
            "field22": {"long": [123]}
        },
        "test3": {
            "foo": {"keyword": ["bar"]},
            "field31": {"long": [5]},
            "field32": {"long": [5]}
        },
        "test4": {
            "foo": {"keyword": ["bar"]},
            "field41": {"long": [6]},
            "field42": {"long": [6]}
        }
    }
}'
    field11    |    field12    |      foo      |    field21    |    field22    |    field31    |    field32    |    field41    |    field42    
---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------+---------------
123            |5              |bar            |123            |123            |5              |5              |6              |6              
123            |5              |bar            |123            |123            |5              |5              |6              |6 

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.0.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Oct 25, 2024
@jackpan123
Copy link
Contributor Author

Can someone help me assign some labels?

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/physical/HashJoinExec.java
@gbanasiak gbanasiak added :Analytics/ES|QL AKA ESQL and removed :Analytics/ES|QL AKA ESQL labels Nov 22, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Nov 22, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Nov 22, 2024
Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution, @jackpan123, nice find!

The fix looks good to me. We will not be able to close #111398 with this, though. Because we'd have to add tests to avoid regressions in the future - but more importantly because LOOKUP is still under development and currently changing a lot, so that the corresponding tests are disabled right now.

@alex-spies alex-spies self-assigned this Nov 22, 2024
@alex-spies
Copy link
Contributor

@elasticsearchmachine test this please

@alex-spies alex-spies added auto-backport Automatically create backport pull requests when merged v8.18.0 labels Nov 22, 2024
@alex-spies
Copy link
Contributor

@elasticsearchmachine generate changelog

@alex-spies
Copy link
Contributor

@elasticsearchmachine test this please

@alex-spies alex-spies merged commit 7ac8d63 into elastic:main Nov 22, 2024
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

alex-spies pushed a commit to alex-spies/elasticsearch that referenced this pull request Nov 22, 2024
Fix a bug in HashJoinExec.addedFields that caused multiple LOOKUPs in a query to fail.
elasticsearchmachine pushed a commit that referenced this pull request Nov 22, 2024
Fix a bug in HashJoinExec.addedFields that caused multiple LOOKUPs in a query to fail.

Co-authored-by: Jack Pan <[email protected]>
smalyshev pushed a commit to smalyshev/elasticsearch that referenced this pull request Nov 22, 2024
Fix a bug in HashJoinExec.addedFields that caused multiple LOOKUPs in a query to fail.
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
Fix a bug in HashJoinExec.addedFields that caused multiple LOOKUPs in a query to fail.
@jackpan123 jackpan123 deleted the fix-double-lookup-failure branch December 1, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >bug external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESQL: double lookup failure
5 participants