Summary
findStageInPlan() in ExplainPlanAnalyzer.ts and collectPlannerStages() in StagePropertyExtractor.ts only traverse inputStage and inputStages — they do not recurse through shards structures. In contrast, traverseStages() (execution-stage traversal for UI) already handles shards.
This means for sharded DocumentDB clusters, planner-stage signals like isBitmap can be missed when they appear under a shard branch. Only Stage 2 informational badges (bitmap, low-cardinality) are affected — Stage 3 (AI) receives the raw explain JSON and is unaffected.
What needs to change
- Extend
findStageInPlan() to recurse through shards structures (matching traverseStages() behavior).
- Extend
collectPlannerStages() similarly.
- Add a sharded test case where
IXSCAN.isBitmap === true appears under a shard branch.
Related
Origin
Identified during review of PR #616 (R-002 in docs/analysis/pr-616-review.md). Severity: Low.
Summary
findStageInPlan()inExplainPlanAnalyzer.tsandcollectPlannerStages()inStagePropertyExtractor.tsonly traverseinputStageandinputStages— they do not recurse throughshardsstructures. In contrast,traverseStages()(execution-stage traversal for UI) already handlesshards.This means for sharded DocumentDB clusters, planner-stage signals like
isBitmapcan be missed when they appear under a shard branch. Only Stage 2 informational badges (bitmap, low-cardinality) are affected — Stage 3 (AI) receives the raw explain JSON and is unaffected.What needs to change
findStageInPlan()to recurse throughshardsstructures (matchingtraverseStages()behavior).collectPlannerStages()similarly.IXSCAN.isBitmap === trueappears under a shard branch.Related
Origin
Identified during review of PR #616 (R-002 in
docs/analysis/pr-616-review.md). Severity: Low.