[META] Mapping conflicts when a field has different types across the indices of one wildcard
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- sql
- Domain
- databases, testing-qa
Research direction
Start by reading the conflict cases in #5752, #5828, #5790, #5811, and #5825, then review the matrix coverage described here and the proposed integration tests in #5754. Compare the remaining command and field-type combinations with #5806; the issue is complete only when the intended handling of conflicting mappings and the affected test coverage are defined.
Written by the indexing model from the issue text.
Description
Problem. A PPL query over a wildcard or rollover pattern such as source=logs-* merges the mappings of every index it matches. When one field has a different type in one of those indices, the merge picks a single type. On a multi-node cluster the pick can change between consecutive requests, see #5752. Depending on the type picked and the command, the same query then returns a 500, a 400, or HTTP 200 with changed or empty values. A rollover that creates a new index with one drifted field is enough to trigger it.
Policy. #5610 proposes how a query should handle these conflicts, with fail-fast, coercion, null on mismatch and dropping the row as candidate modes.
Coverage so far.
- 23 types:
keyword,text,textwith akeywordsubfield,match_only_text,long,integer,short,byte,double,float,half_float,scaled_float,boolean,date,date_nanos,ip,binary,geo_point,object,nested, analiasof along,flat_objectandconstant_keyword. Each type runs on its own index, and each pair of them, plus the field missing from one index, runs through one wildcard. - 75 query templates over 41 of the 45 commands in the 3.5 PPL command list, run on
main.- Excluding
ml,kmeansandad, which need a modelshow datasources, which reads no index.
- Excluding
- Not covered yet: the 9 commands added since 3.5,
convert,foreach,graphlookup,makeresults,mvexpand,nomv,rest,unionandxyseries.
Caused by the conflict
- HTTP 200 with wrong or empty values
- #5752
- #5828
- HTTP 500, where the issue expects a result or a 400 naming the conflicting types
- #5790
- #5811
- #5825
- #5835
- #5897
Found during the conflict tests, but reproduce on a single index
- HTTP 500 instead of a result
- #5873
chartover anestedfield, to be filed
- HTTP 500 instead of HTTP 400
- #5750
- #5836
- #5856
- #5857
- #5885
- #5886
- #5887
- #5898
- #5899
- #5900
- Requests the engine correctly rejects come back as 500, such as
binwithbinson a timestamp outside an aggregation, to be filed
Related.
- #5754 proposes integration tests over the command and data-type matrix, which would cover these cases.
- #5806 tracks the test coverage for data streams and schema evolution, whose acceptance criteria rule out these 500s.
- Dominant language
- Java
- Stars
- 176
- Forks
- 237
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 34
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from opensearch-project/sql
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opensearch-project/sql#5990 ·
Maintainers usually reply within 1 day
-
bug untriaged
Difficulty 1/5 Under an hour Newbie friendliness 85/100
opensearch-project/sql#5983 ·
Maintainers usually reply within 1 day
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"Possibly taken @nagendramohan claimed this 107 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
opensearch-project/sql#5684 · 4 comments ·
Maintainers usually reply within 1 day
-
[DOC] Calcite settings documentation missing examplesPossibly taken @AzazelSensei claimed this 64 days ago. Opendocumentation PPL
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
opensearch-project/sql#4806 · 1 comment ·
Maintainers usually reply within 1 day
-
calcite enhancement Meta performance PPL untriaged
Difficulty 5/5 Over a week Newbie friendliness 8/100
opensearch-project/sql#5991 ·
Maintainers usually reply within 1 day
All issues in opensearch-project/sql
Similar issues
-
chore
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
lugassawan/swe-workbench#841 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EndlessPixel-Studio/FakePlayer-CE#155 ·
Maintainers usually reply within 1 day
-
Document the isv:HDFGroup Linux package repositories and signing keyPossibly taken @brtnfld claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
checkstyle/checkstyle#23174 ·
Maintainers usually reply within 1 day