Skip to content

docs(nosql): document LOG/LOG10 zero-argument limitation (#310)#3149

Open
bk201- wants to merge 1 commit into
mainfrom
docs/nosql-log-zero-language-limitation
Open

docs(nosql): document LOG/LOG10 zero-argument limitation (#310)#3149
bk201- wants to merge 1 commit into
mainfrom
docs/nosql-log-zero-language-limitation

Conversation

@bk201-

@bk201- bk201- commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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 c is perfectly valid and only fails for rows where c.value <= 0. A static diagnostic would fire on every LOG(...) call and produce false positives, so we document the behaviour instead.

Changes

  • Hover docs (src/docs/index.ts): added a warning to LOG and LOG10 explaining the -Infinity -> 4001 behaviour and a guard workaround (WHERE c.value > 0 or c.value > 0 ? LOG(c.value) : null).
  • Fixtures (select-functions.ts): reclassified M-07 / M-13 knownLimitation from emulator-only to a Cosmos DB language limitation.
  • test-suite.md: moved M-07 / M-13 into a new Cosmos DB language limitations (not emulator-specific) section.
    Closes No 'Open' action displays for a graph/document #310

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.
@bk201- bk201- requested a review from a team as a code owner June 11, 2026 17:02
@github-actions

Copy link
Copy Markdown
Contributor

🔬 NoSQL language-service integration

Commit: a3d8008
Pull Request: #3149 docs(nosql): document LOG/LOG10 zero-argument limitation (#310)

🧪 Result

  • NoSQL integration tests: ✅ success

📥 Artifacts (run)

@github-actions

Copy link
Copy Markdown
Contributor

🔨 Build, Lint & Test

🔗 Source

📦 Package Information

🧪 Test Results

  • Unit Tests: ✅ success
  • Integration Tests (extension host): ✅ success

📥 Artifacts (run)

✅ Build Status

Build and local tests passed. See sibling comments below for E2E and NoSQL integration results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No 'Open' action displays for a graph/document

1 participant