sql
sql copied to clipboard
[BUG] Delete query in query workbench returns 0 lines deleted while select returns multiple lines
Describe the bug
GIVEN, I go the the query workbench AND I run the select query
select * from filebeat-prodapps-2022.10.04
where container.labels.io_kubernetes_pod_namespace = "xyz"
AND this query gives me multiple results
THEN I expect that the delete query
delete from filebeat-prodapps-2022.10.04
where container.labels.io_kubernetes_pod_namespace = "xyz"
to delete multiple entries. This is however not the case

To Reproduce Steps to reproduce the behavior:
- Go to query workbench
- run a select query like the one above
- you should get back multiple results
- change the select * to delete
- you likely get an error stating that the query is wrong. This could be because delete is turned off by default
- if its turned off run
PUT _plugins/_query/settings { "transient": { "plugins.sql.delete.enabled": "true" } }
- try again. I expect you get a result like the image above. I tested this with 2 different indexes with the same fields
Expected behavior I expect to get back a delete success with a number of lines that got deleted
OpenSearch Version I'm running opensearch/dashboards version 2.3.0 via docker compose.
Dashboards Version 2.3.0
Plugins
security, alerting, ML, everyting from the default docker compose
Host/Environment (please complete the following information):
- Ubuntu 20.04
- Firefox 105.0.2
@drBenway Thanks for reporting the issue! Will investigate based on the info you provided.