opensearch-project / opensearch-project/sql
[BUG] Index patterns in nested collection queries
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
What is the bug?
Using wildcards in index name works for simple queries only. Self-joined queries fail. More details in index-patterns-for-querying-nested-collection discussion:
How can one reproduce the bug?
Steps to reproduce the behavior:
- Use sample data from:
https://opensearch.org/docs/latest/search-plugins/sql/sql/partiql/
Map array of object as nested type.
- Query nested collection using index pattern
employees*:
SELECT e.name AS employeeName,
p.name AS projectName
FROM employees* AS e,
e.projects AS p
WHERE p.name LIKE '%security%'
Result:
{
"error": {
"reason": "There was internal problem at backend",
"details": "Index type [employees*] does not exist",
"type": "IllegalArgumentException"
},
"status": 500
}
What is the expected behavior?
Search all indexes matching a given pattern
What is your host/environment?
2.6.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SQL/PartiQL nested-collection example and reproduce the query against the sample data using the employees* index pattern. Trace how index patterns are handled for the self-joined nested query. Done means the query searches all matching indexes instead of returning the "Index type [employees*] does not exist" error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100