Skip to content

Fix provenance for lookups with multiple inputs - #780

Merged
simolus3 merged 1 commit into
mainfrom
provenance-fix
Sep 1, 2026
Merged

Fix provenance for lookups with multiple inputs#780
simolus3 merged 1 commit into
mainfrom
provenance-fix

Conversation

@simolus3

@simolus3 simolus3 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This applies the patch contributed through this analysis repo: For lookups with multiple inputs, we'd previously generate a fresh symbol in every iteration calling setOrUpdate. This is incorrect, the outputs are part of the same materialized result set and should not be combined later.

The patch was generated by Codex, I manually reviewed changes and made some slight test simplifications.

I want to take a look at removing the provenance system altogether in favor of something that is actually capable of performing joins. That is a bigger change though, so this is another quick fix for the current approach.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a5e5989

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@powersync/service-sync-rules Patch
@powersync/service-core Patch
@powersync/lib-services-framework Patch
@powersync/service-module-convex Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
@powersync/service-module-core Patch
@powersync/service-image Patch
test-client Patch
@powersync/service-rsocket-router Patch
@powersync/lib-service-mongodb Patch
@powersync/lib-service-postgres Patch
@powersync/service-schema Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simolus3
simolus3 requested a review from rkistner September 1, 2026 06:58
@simolus3
simolus3 merged commit 4b6a23e into main Sep 1, 2026
46 checks passed
@simolus3
simolus3 deleted the provenance-fix branch September 1, 2026 08:42
@benkraus

benkraus commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for reviewing my clankers’ fix! Hope some of the docs at least were helpful

@simolus3

simolus3 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for sharing the patch! We'll also use this opportunity to replace the whole provenance thing with something that is much easier to understand: #782.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants