Skip to content

Lookup join on multiple join fields not yet supported - #118858

Merged
astefan merged 5 commits into
elastic:mainfrom
astefan:lookup_on_multiple_indices_forbid_tests
Dec 18, 2024
Merged

astefan merged 5 commits into
elastic:mainfrom
astefan:lookup_on_multiple_indices_forbid_tests

Conversation

@astefan

@astefan astefan commented Dec 17, 2024

Copy link
Copy Markdown
Contributor

lookup joins shouldn't work on multiple join fields at the moment.
This PR also adds tests for another existent limitation: joining fields must be only actual index fields (not constants for example).

@astefan astefan added >enhancement auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.0.0 v8.18.0 labels Dec 17, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Dec 17, 2024
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @astefan, I've created a changelog YAML for you.

@bpintea bpintea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a note, LG otherwise.

}

var matchFieldsCount = joinFields.size();
if (matchFieldsCount > 1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we check (above) that a same field isn't already added? Specifying a join key multiple times doesn't actually modify the output, so we could allow that (like we do for groups now, for instance, or drop or keep).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you mean lookup join test on languages, languages should be considered as lookup join test on languages?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, that was what I was thinking. Or, when we might support more, ON x, y, x be same as ON x, y.
But can be left as is as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Imo, we are hiding a behavior (eliminating duplicates) without the user being notified of, what is in essence, an incorrect query. I think for now I will leave this as is in this PR and relax things later, if we identify this as a drawback. Thanks.

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

💚 Backport successful

Status Branch Result
✅ 8.x

astefan added a commit to astefan/elasticsearch that referenced this pull request Dec 18, 2024
@astefan
astefan deleted the lookup_on_multiple_indices_forbid_tests branch December 18, 2024 11:17
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Dec 18, 2024
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 >enhancement 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.

3 participants