Skip to content

Align scan and seek signatures, expose multi-start in seek - #305

Merged
em3s merged 2 commits into
mainfrom
fix/seek-multi-start
May 7, 2026
Merged

em3s merged 2 commits into
mainfrom
fix/seek-multi-start

Conversation

@zipdoki

@zipdoki zipdoki commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #304 (comment). seek is backed by Label.cache / hbaseGetWideRow, which already take a list of keys, but TableBinding.seek / QueryService.seek / the HTTP controller exposed only a single Any. Widen the external surface to List<Any> so it matches the underlying capability and aligns with agg's start: List<Any>.

seek also gains filters and features to mirror scan. Neither is implemented on the cache path; V2BackedTableBinding.seek rejects them via require(...) in the same style as QueryService.counts / gets, so the surface can be filled in later without another signature break.

Changes

  • TableBinding.seek / QueryService.seek / V2BackedTableBinding.seek / NilTableBinding.seek: start: Any → List<Any>, plus filters: String? and features: List<String>.
  • V2BackedTableBinding.seek: pass start straight through to label.cache(start, …); require(filters == null) and require(features.isEmpty()).
  • EdgeQueryController.seek: @RequestParam start: List<String> (mirrors agg), plus filters and features.
  • ActionbaseQueryExecutor.processSeek: drop the per-source Flux.fromIterable.flatMap; pass the resolved sources into seek in a single call.

How to Test

  • `./gradlew :engine:test --tests "com.kakao.actionbase.v2.engine.v3.EdgeCacheQuerySpec"`
  • `./gradlew :engine:test --tests "com.kakao.actionbase.v2.engine.v3.MultiHopQuerySpec"`
  • `./gradlew :server:test --tests "com.kakao.actionbase.server.api.graph.v3.EdgeCacheQueryE2ETest"`
  • `./gradlew spotlessCheck`

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (Opus 4.7, 1M context)

Follow-up to #304. `seek` is backed by multi-scan — `Label.cache(sources: List<Any>, ...)` and `hbaseGetWideRow(rows: List<ByteArray>, ...)` already accept multiple keys, but `TableBinding.seek` / `QueryService.seek` / the controller only exposed a single `Any`. Widen the external surface to `List<Any>` so it matches the underlying capability and the parameter shape of `agg`.

Also add `filters` and `features` to `seek` so its signature mirrors `scan`. Neither is implemented for the cache path; `V2BackedTableBinding.seek` rejects them via `require(...)` in the same style as `QueryService.counts` / `gets`, leaving room for a later implementation without another signature break.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zipdoki
zipdoki requested a review from em3s as a code owner May 7, 2026 05:46
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels May 7, 2026
@zipdoki zipdoki self-assigned this May 7, 2026
@zipdoki
zipdoki removed the request for review from em3s May 7, 2026 05:47
@zipdoki

zipdoki commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

@em3s
Done — opened #305. PTAL when you get a chance.

Follow-up to f1bc511, which widened `seek`'s `start` parameter to `List<Any>` but only flipped existing single-start tests to wrap their argument in a list. Add two cases that actually exercise the multi-start path: one with edges across two sources to confirm both rows are merged into the result, and one where one of the start vertices has no edges to confirm the empty source is tolerated rather than failing the query.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@em3s

em3s commented May 7, 2026

Copy link
Copy Markdown
Contributor

Optimistic Merge

@em3s
em3s merged commit 88957a1 into main May 7, 2026
2 checks passed
@em3s
em3s deleted the fix/seek-multi-start branch May 7, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants