azure-cosmos-db-emulator-docker
azure-cosmos-db-emulator-docker copied to clipboard
"<>" inequality operator gives token parsing error
Describe the bug The vNext Azure Cosmos DB Emulator does not support the <> inequality operator
To Reproduce Steps to reproduce the behavior:
- Bring up the vNext Azure Cosmos DB Emulator
- Create new Container (properties are irrelevant)
- Attempt a query or a filter with a WHERE clause such as
where c.id <> "12" - Error message observed at bottom of screen is
Failed to parse token '>' at position 85 - Log errors include
DocDBTrace Warning: 0 : Intercepted query parsing error Antlr4.Runtime.NoViableAltException: Exception of type 'Antlr4.Runtime.NoViableAltException' was thrown.
at Antlr4.Runtime.Atn.ParserATNSimulator.ExecATN(DFA dfa, DFAState s0, ITokenStream input, Int32 startIndex, ParserRuleContext outerContext)
at Antlr4.Runtime.Atn.ParserATNSimulator.AdaptivePredict(ITokenStream input, Int32 decision, ParserRuleContext outerContext)
at Microsoft.Azure.Cosmos.Postgres.Core.Query.Antlr.Generated.CosmosQueryParser.scalar_expression(Int32 _p) in /tmp/gateway/Cosmos.Postgres.Core/Query/Parser/Generated/CosmosQueryParser.cs:line 1981
DocDBTrace Warning: 0 : Intercepted query parsing error Antlr4.Runtime.NoViableAltException: Exception of type 'Antlr4.Runtime.NoViableAltException' was thrown.
at Antlr4.Runtime.Atn.ParserATNSimulator.ExecATN(DFA dfa, DFAState s0, ITokenStream input, Int32 startIndex, ParserRuleContext outerContext)
at Antlr4.Runtime.Atn.ParserATNSimulator.AdaptivePredict(ITokenStream input, Int32 decision, ParserRuleContext outerContext)
at Microsoft.Azure.Cosmos.Postgres.Core.Query.Antlr.Generated.CosmosQueryParser.scalar_expression(Int32 _p) in /tmp/gateway/Cosmos.Postgres.Core/Query/Parser/Generated/CosmosQueryParser.cs:line 1968
Expected behavior The <> operator should work as it does on the Cloud CosmosDB
Screenshots
Desktop (please complete the following information):
- OS: [e.g. MacOS]
- Browser [Chrome]
- Explorer Version 3bf0f09d37fb559466f78c848326b8adfb409ba6
- Docker image information: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator vnext-preview db99cc6bc4aa
Additional context It's causing a problem because we require it in our TestContainers. Code such as the following is currently incompatible with the vNext emulator and will cause issues with the ChangeFeed feature.
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/changefeed/pkversion/LeaseStoreManagerImpl.java#L502