Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the optional Kyo–ZQuery integration.
No open issues 🎉
What changed in this PR
Adds an optional kyoZquery[E] interpreter that builds on #400’s shared Kyo query plans, allowing existing proofs and datasource callbacks to participate in ZQuery batching without duplicate registrations.
Changes:
- Translates structured source/key requests into ZQuery batches while preserving typed failures and uncached ordinary effects.
- Adds nine regression tests covering batching, source isolation, execution paths, result shapes, failures, and reruns.
- Registers the module for JVM and Scala.js and documents the shared-registration API.
| File | Description |
|---|---|
README.md |
Links to the new Kyo–ZQuery integration documentation. |
kyo-zquery/src/test/scala/decrel/reify/KyoZquerySpec.scala |
Adds adapter regression coverage. |
kyo-zquery/src/main/scala/decrel/reify/kyoZquery.scala |
Implements datasource adapters, plan translation, and ZQuery relation methods. |
kyo-zquery/README.md |
Documents registration, execution paths, and supported effects. |
build.sbt |
Adds the module, dependencies, and JVM/Scala.js build targets. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kyo relation implementations currently need a separate set of ZQuery-backed proofs to participate in ZQuery batching. Add an optional
kyoZquery[E]interpreter mixin that reuses the same Kyo proofs, datasource callbacks, and shared source descriptors.Register each datasource once.
startingFromhandles native Kyo Batch,toBatchleaves it to the caller, and the mixin addstoZQuery/toZQueryMany. The adapter translates structured source/key requests before execution, so separately constructed queries can share ZQuery batches. Callbacks run throughZIOs.run, preserving typedAbort[E]failures. Ordinary lifted effects are translated without keyed caching or deduplication.Supports
Async & Abort[E]; handle other Kyo effects inside callbacks. Native-only users retainkyoBatch[Eff]without a ZQuery dependency. The module builds on JVM and Scala.js and documents the shared-registration API.Stacked on #400, which supplies structured query plans, shared source descriptors, and unhandled Batch execution. Review and merge #400 first.
Validation: all nine adapter regressions pass on JVM and Scala.js, covering equivalent results across all three execution paths, batching across separate queries, datasource identity isolation, dependent stages, optional/many shapes, asynchronous custom callbacks, typed failures, empty inputs, reruns, and ordinary effects. Parent core regressions and workflow checks pass; changed Scala sources are formatted.