generated from amazon-archives/__template_Custom
-
Couldn't load subscription status.
- Fork 176
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
Currently PPL query does not support fields of alias type. When an alias field is used in a PPL query, it results in a "field not found" semantic error as below:
# Index mapping:
{
"mappings": {
"properties": {
"@gender": {
"type": "alias",
"path": "gender"
},
"gender": {
"type": "text",
"fielddata": true
},
# IT
@Test
public void testFieldsWithOneField() throws IOException {
JSONObject result =
executeQuery(String.format("source=%s | fields @gender", TEST_INDEX_ACCOUNT));
verifyColumn(result, columnName("firstname"));
}
# Error message
method [POST], host [http://127.0.0.1:62157], URI [/_plugins/_ppl], status line [HTTP/1.1 400 Bad Request]
{
"error": {
"reason": "Invalid Query",
"details": "can't resolve Symbol(namespace=FIELD_NAME, name=@gender) in type env",
"type": "SemanticCheckException"
},
"status": 400
}
What solution would you like?
Add alias field name to symbol table when analyzing the query to avoid such semantic error.
What alternatives have you considered?
Keep current behavior and document the limitation.
Do you have any additional context?
N/A
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request