docs(nosql): document LOG/LOG10 zero-argument limitation (#310)#3149
Merged
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: e3bfbf0 🧪 Result
📥 Artifacts (run)
|
Contributor
🔨 Build (Compile, Lint, Prettier, l10n, Package)🔗 Source
🧱 Step Results
📦 Package Information
📥 Artifacts (run)✅ Build StatusCompile, analyzers and packaging passed. See sibling comments for unit/integration and E2E results. |
sevoku
previously approved these changes
Jun 16, 2026
sevoku
left a comment
Member
There was a problem hiding this comment.
Referenced the wrong issue in PR description?
# Conflicts: # packages/nosql-language-service/docs/test-suite.md
Contributor
🧪 Tests (Unit + Integration)Commit: e3bfbf0 🧪 Results
|
Contributor
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/vitestThe overall coverage remains at 81%, unchanged from the branch. Code Coverage is in Public Preview. Learn more and provide us with your feedback. |
sevoku
approved these changes
Jun 16, 2026
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