azure-cosmos-db-emulator-docker icon indicating copy to clipboard operation
azure-cosmos-db-emulator-docker copied to clipboard

UPPER, LTRIM and RTRIM are not supported #cosmosEmulatorVnextPreview

Open jvalkeejarvi opened this issue 1 year ago • 5 comments

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"

jvalkeejarvi avatar Dec 04 '24 07:12 jvalkeejarvi

In progress

DmitriMelnikov avatar Dec 06 '24 22:12 DmitriMelnikov

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

DmitriMelnikov avatar Dec 17 '24 18:12 DmitriMelnikov

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')

jvalkeejarvi avatar Dec 17 '24 20:12 jvalkeejarvi

Please also consider LOWER for the next release

keba-lum avatar Jan 27 '25 11:01 keba-lum

@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.

lionelc avatar Mar 02 '25 02:03 lionelc

@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).

lionelc avatar Jun 24 '25 15:06 lionelc

We published a fix and will close this issue. Please reopen if you have still problems

xgerman avatar Jun 24 '25 16:06 xgerman