azure-cosmos-db-emulator-docker
azure-cosmos-db-emulator-docker copied to clipboard
UPPER, LTRIM and RTRIM are not supported #cosmosEmulatorVnextPreview
These queries throw System.NotSupportedException:
SELECT * FROM c where LTRIM(c.name) = "NAME1"
SELECT * FROM c where RTRIM(c.name) = "NAME1"
SELECT * FROM c where UPPER(c.name) = "NAME1"
In progress
Our publish pipeline did not work until recently preventing the fixes from shipment. Pipeline is fixed now, and the fixes should be available. Please use docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview to download the latest image and docker inspect mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview to validate the latest build: Created field should be no less than 2024-12-16T20:25:13.18725592Z
Using nested LTRIM, RTRIM, and UPPER seems to give a syntax error. For example following query:
SELECT * FROM c where LTRIM(RTRIM(c.name)) = "name1"
fails with error message:
syntax error at or near "{" Cosmos query text: SELECT * FROM c where LTRIM(RTRIM(c.name)) = "name1" -> SELECT * FROM %s AS c WHERE (cosmos_catalog.cosmos_ltrim(c.document, '{"cosmos_catalog.cosmos_rtrim(c.document, '{"name":null}')":null}') = 'name1')
Please also consider LOWER for the next release
@jvalkeejarvi it has been fixed in our recent release. Please try:
docker pull mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-EN20250228
@keba-lum Apologies for the inconvenience without LOWER. But we will support it in our next release. Please stay tuned and thank you for your feedback.
@keba-lum We added LOWER in our last release https://github.com/Azure/azure-cosmos-db-emulator-docker/releases/tag/EN20250612 . Please let us know if you have further issues (reopen this issue or open another one).
We published a fix and will close this issue. Please reopen if you have still problems