-
Notifications
You must be signed in to change notification settings - Fork 190
[Bug] Support Multi-fields in WHERE Conditions #1074
Copy link
Copy link
Open
Labels
PPLPiped processing languagePiped processing languageerror-experienceIssues related to how we handle failure cases in the plugin.Issues related to how we handle failure cases in the plugin.field types support
Description
What is the bug?
There is limitation on Multi-fields in WHERE Conditions
If a field is defined with multiple types, then SQL engine treat it as text_keyword.
How can one reproduce the bug?
For example if the field defined as
"id1" : {
"type" : "keyword",
"fields" : {
"id2" : {
"type" : "integer"
}
}
},
then following query
SELECT id1
FROM sample_data
WHERE n1 IN ('19') AND n2 IN ('299')
ORDER BY id1.id2 ASC LIMIT 10 OFFSET 0
will result in error
{
"error": {
"reason": "Invalid SQL query",
"details": "can't resolve Symbol(namespace=FIELD_NAME, name=id1.id2) in type env",
"type": "SemanticCheckException"
},
"status": 400
}
What is the expected behavior?
For multi-field (a text field with another keyword field inside), there should be no assumption that the keyword field name is always "keyword".
Query with above format should return expected result.
What is your host/environment?
- OS: [e.g. iOS]
- Version [e.g. 22]
- Plugins
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PPLPiped processing languagePiped processing languageerror-experienceIssues related to how we handle failure cases in the plugin.Issues related to how we handle failure cases in the plugin.field types support
Type
Projects
Status
Not Started