Repository navigation
docs(cosmosdb): filters, projection and limits push down into Cosmos DB - #2298
Conversation
✅ Pull with Spice PassedPassing checks:
|
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
1 similar comment
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both pages overstate filter support by omitting data-type and literal constraints.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Updates vNext Cosmos DB documentation for pushdown behavior introduced by spiceai/spiceai#14419.
Changes:
- Documents projection and partial filter pushdown.
- Documents limit behavior and custom-query restrictions.
| File | Description |
|---|---|
cosmosdb/index.md |
Updates connector limitations. |
cosmosdb/deployment.md |
Updates deployment limitations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
🚀 deployed to https://a138b199.spiceai-org-website.pages.dev |
|
🚀 deployed to https://2142c9f8.spiceai-org-website.pages.dev |
|
🚀 deployed to https://21b59e99.spiceai-org-website.pages.dev |
…pice Co-Authored-By: Claude <noreply@anthropic.com>
|
🚀 deployed to https://ed5426fe.spiceai-org-website.pages.dev |
…WEEN to literal bounds Co-Authored-By: Claude <noreply@anthropic.com>
|
🚀 deployed to https://cdbef61d.spiceai-org-website.pages.dev |

Summary
spiceai/spiceai#14419 added filter, projection, and limit pushdown to the Cosmos DB connector. On vNext, the Cosmos DB reference page and deployment guide still listed "No filter / projection / limit pushdown" as a limitation. This PR replaces that bullet on both pages with a description of what pushes down: the projection and supported
WHEREconditions whenqueryis the defaultSELECT * FROM c, and aLIMITwith any query.Source PRs
Files changed (2)
website/docs/components/data-connectors/cosmosdb/index.mdwebsite/docs/components/data-connectors/cosmosdb/deployment.mdPropagation: version-specific change, vNext only.
git grep -c supports_filters_pushdown v2.3.2 -- crates/data-connectors/connector-cosmosdbreturns no hits, so the "No filter / projection / limit pushdown" bullet stays correct in the 8 versioned copies (2.0.x–2.3.x, two pages each).grep -rln "No filter / projection / limit pushdown" website/docsnow returns nothing.The MongoDB and DynamoDB parts of #14419 change which filters push down, but no published page makes a claim about their pushdown, so neither page needs a change.
grep -in pushreturns only an unrelated DynamoDB timestamp line.Verification
All code is at
origin/trunkb5126937a8. These are name/existence claims, each Reproduced by the quoted line:crates/data-connectors/connector-cosmosdb/src/cosmosdb/provider.rs:fn pushes_down(&self) -> bool { self.config.query.trim().eq_ignore_ascii_case(super::DEFAULT_QUERY) }, withpub const DEFAULT_QUERY: &str = "SELECT * FROM c";incosmosdb/mod.rs.supports_filters_pushdownreturnsUnsupportedfor every filter when!self.pushes_down().pushed_down_querybuildsSELECT {projected properties} FROM c WHERE ….filter.rsclassify:Some(_) => TableProviderFilterPushDown::Inexact, None => TableProviderFilterPushDown::Unsupported.Translator::translate:Operator::And;Operator::Or(both sides must translate); column-vs-literalEq/NotEq/Lt/LtEq/Gt/GtEq; a booleanExpr::ColumnandExpr::Notover a boolean column only;IsNull;IsNotNull;Between { negated: false };InList { negated: false }withvalues.len() > MAX_IN_VALUES(256) or any null refused;Likeon aKind::Utf8column vialike_prefix; DataFusion's ownstarts_with;_ => None.CosmosDBExecreadswhile read < limitfor either query mode.Behavior: Unverified, code inspection only. I did not run the claim that results match a query with no pushdown, because it needs a Cosmos DB account or the emulator. The source PR's differential round-trip suite (
crates/runtime/tests/pushdown_roundtrip/) is the runtime evidence.Dedupe:
gh pr list --repo spiceai/docs --state all --search "spiceai/spiceai#14419"→[]. Open bot PRs #2133, #2296, and #2297 do not touch these files.Build:
cd website && npm run buildexits 0 and ends with[SUCCESS] Generated static files in "build".Test plan
cd website && npm run buildpassesReproduction
Doc said (
website/docs/components/data-connectors/cosmosdb/index.md:223at6409e742):No filter / projection / limit pushdown into Cosmos: SQL predicates are evaluated locally by DataFusion after the documents have been streamed in.Code says (
connector_cosmosdb::cosmosdb::provider::CosmosDBTableProvider::supports_filters_pushdownat trunkb5126937a8):let translator = Translator::new(&self.schema); Ok(filters.iter().map(|f| translator.classify(f)).collect())Behavior claim: not run (needs a Cosmos DB account or the emulator), so the correction is Unverified, code inspection only for result equivalence.