feat: 支持surrealDB图关联查询 --story=133245352 - #1433
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42d6e666a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if resourceType == source || resourceType == target { | ||
| // 调用方有时会把完整资源路径原样传回来,例如 [source, ..., target]。 | ||
| // 路径搜索本身已经固定两端点,这里只保留中间资源约束,避免把端点重复参与连续片段判断。 | ||
| continue |
There was a problem hiding this comment.
Preserve endpoint anchoring in path_resource constraints
When a caller passes a partial or full path_resource that includes an endpoint, these lines drop every occurrence of the source/target before the contiguous-path check. For example, a constraint like [source, b, target] becomes just [b], so paths with extra hops such as source -> a -> b -> c -> target are accepted even though the caller pinned a specific contiguous route. This can make the new v1beta3 API return targets through a path the request explicitly tried to exclude.
Useful? React with 👍 / 👎.
| if err := validateTargetCount(len(matchers)); err != nil { | ||
| span.Set("failure-stage", "target-limit") | ||
| return nil, nil, nil, err |
There was a problem hiding this comment.
Skip whole-interval target limits for range queries
This validation runs for both instant and range modes, but in range mode matchers is the distinct target set across the whole interval, not the per-timestamp result that the range API later returns and validates with validateRangeTargetCounts. A range query where each bucket stays under MaxTargets but the union across all buckets exceeds it will be rejected as truncated/400 before the per-bucket limit check can run.
Useful? React with 👍 / 👎.
…ive-edge-serving # Conflicts: # pkg/unify-query/metric/metric.go
支持 surrealDB v1beta3 图关联查询。