Skip to content

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

Merged
bk201- merged 3 commits into
mainfrom
docs/nosql-log-zero-language-limitation
Jun 17, 2026
Merged

docs(nosql): document LOG/LOG10 zero-argument limitation (#310)#3149
bk201- merged 3 commits 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

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🔬 NoSQL language-service integration

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

🧪 Result

  • NoSQL integration tests: ✅ success

📥 Artifacts (run)

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🔨 Build (Compile, Lint, Prettier, l10n, Package)

🔗 Source

🧱 Step Results

  • Validate Version: ✅ success
  • Localization: ✅ success
  • Lint: ✅ success
  • Prettier: ✅ success
  • Compile (tsc): ✅ success
  • Package: ✅ success
  • External Skills (info): ✅ success

📦 Package Information

📥 Artifacts (run)

✅ Build Status

Compile, analyzers and packaging passed. See sibling comments for unit/integration and E2E results.

sevoku
sevoku previously approved these changes Jun 16, 2026

@sevoku sevoku left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referenced the wrong issue in PR description?

# Conflicts:
#	packages/nosql-language-service/docs/test-suite.md
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🧪 Tests (Unit + Integration)

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

🧪 Results

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

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

The overall coverage remains at 81%, unchanged from the branch.


Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@bk201- bk201- merged commit 938f9b3 into main Jun 17, 2026
8 checks passed
@bk201- bk201- deleted the docs/nosql-log-zero-language-limitation branch June 17, 2026 10:02
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

2 participants