azure-cosmos-db-emulator-docker
azure-cosmos-db-emulator-docker copied to clipboard
Preview doesn't support IN query condition
Describe the bug
Query by IN operator with placeholders is not supported:
POST http://127.0.0.1:8081/dbs/integration-test-db/colls/test-table/docs
--------------------------------------------------------------------------------
RESPONSE 500: 500 Internal Server Error
ERROR CODE: 500 Internal Server Error
--------------------------------------------------------------------------------
{
"code": "InternalServerError",
"message": "Index does not have options 16 Cosmos query text: select * from docs C WHERE C.StringAttribute IN (@StringAttribute0_0,@StringAttribute0_1,@StringAttribute0_2,@StringAttribute0_3) OFFSET 0 LIMIT 1000 -\u003E SELECT * FROM %s AS C WHERE cosmos_catalog.cosmos_in(C.document, $1 ) OFFSET 0 LIMIT 1000"
}
--------------------------------------------------------------------------------
To Reproduce
- Create query with IN condition and placeholder values
select * from docs C WHERE C.StringAttribute IN (@StringAttribute0_0,@StringAttribute0_1,@StringAttribute0_2,@StringAttribute0_3) OFFSET 0 LIMIT 1000
Expected behavior
Query executed without errors
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS M4
- Browser chrome
- Version mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview
- SDK github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos v1.2.0
- SDK golang
Additional context Add any other context about the problem here.