OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[BUG] PPL does not work on alias fields, OSD does not report a useful error
Describe the bug
I loaded the sample log data and created an index pattern. The sample data includes @timestamp as an alias field. I tried to use the discover panel, but PPL did not work for the index pattern at all. The only indication was a small triangle with an exclamation mark and the word "Error". The error message says "response is undefined"
Most people will start with @timestamp as their time field, so maybe we shouldn't show @timestamp (or any alias fields) in the time fields when I create the index pattern?
To Reproduce Steps to reproduce the behavior: See above. Load the sample log data. Create an index pattern. Use PPL.
Expected behavior
- PPL should work with alias fields
- The error message should clarify why the request failed
OpenSearch Version 2.19
Dashboards Version OSUI with an OpenSearch Service domain as a source
Plugins
N/A
Screenshots
Host/Environment (please complete the following information):
- OS: MacOS
- Firefox
To narrow down the scope, I ran the PPL query in the AOS 2.19 domain and didn’t encounter any issues. From what I can see, the query itself doesn’t involve any alias fields, so it might be helpful for the OSD developer to investigate further on the front-end side.
POST _plugins/_ppl
{
"query": """
source = opensearch_dashboards_sample_data_logs
| where `response` = '200'
| stats count() as count
"""
}
{
"schema": [
{
"name": "count",
"type": "integer"
}
],
"datarows": [
[
12832
]
],
"total": 1,
"size": 1
}