docs(nosql): document LOG/LOG10 zero-argument limitation (#310)#3149
Open
bk201- wants to merge 1 commit into
Open
docs(nosql): document LOG/LOG10 zero-argument limitation (#310)#3149bk201- wants to merge 1 commit into
bk201- wants to merge 1 commit into
Conversation
LOG(0)/LOG10(0) (and negative args) evaluate to -Infinity, which is not valid JSON; Azure Cosmos DB rejects the result with HTTP 400 error 4001 on both production and the emulator. This is data-dependent, so no static diagnostic is emitted - documented in hover docs instead, with a guard workaround. Reclassified M-07/M-13 fixtures from emulator-only to a Cosmos DB language limitation.
Contributor
🔬 NoSQL language-service integrationCommit: a3d8008 🧪 Result
📥 Artifacts (run)
|
Contributor
🔨 Build, Lint & Test🔗 Source
📦 Package Information
🧪 Test Results
📥 Artifacts (run)✅ Build StatusBuild and local tests passed. See sibling comments below for E2E and NoSQL integration results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the
LOG()/LOG10()zero-argument behaviour reported in #310.LOG(0),LOG10(0)(and any negative argument) evaluate to-Infinity, which cannot be represented in JSON (RFC 8259). Azure Cosmos DB therefore rejects the result with HTTP 400, error code 4001 — confirmed on both production and the emulator.Why no diagnostic?
This is data-dependent: a query like
SELECT LOG(c.value) FROM cis perfectly valid and only fails for rows wherec.value <= 0. A static diagnostic would fire on everyLOG(...)call and produce false positives, so we document the behaviour instead.Changes
src/docs/index.ts): added a warning toLOGandLOG10explaining the-Infinity-> 4001 behaviour and a guard workaround (WHERE c.value > 0orc.value > 0 ? LOG(c.value) : null).select-functions.ts): reclassifiedM-07/M-13knownLimitationfrom emulator-only to a Cosmos DB language limitation.M-07/M-13into a new Cosmos DB language limitations (not emulator-specific) section.Closes No 'Open' action displays for a graph/document #310