Skip to content

Add join variants and examples#3

Open
dzmitry-lahoda wants to merge 2 commits into
Fabian2000:mainfrom
dzmitry-lahoda-forks:examples
Open

Add join variants and examples#3
dzmitry-lahoda wants to merge 2 commits into
Fabian2000:mainfrom
dzmitry-lahoda-forks:examples

Conversation

@dzmitry-lahoda
Copy link
Copy Markdown

@dzmitry-lahoda dzmitry-lahoda commented May 2, 2026

Notes

Based on #2

Assuming it is not possible to make rows_number nice enough to use #5

Summary

Adds join and positional pairing variants to OQL:

  • join_must: inner equality join that panics when an outer row has no matching inner row.
  • join_left: left equality join that keeps unmatched outer rows and projects joined fields as Option values.
  • last_must: fast must-match join that keeps only the last inner row per key, avoiding per-key match vectors when only the final match is needed.
  • zip: positional pairing that matches Rust Iterator::zip and stops when either side ends.
  • zip_must: positional pairing that panics if the two sources have different lengths.

Also adds regression coverage for left-join field rewriting through let bindings and nested method receivers, plus dedicated zip.rs tests, docs, and UI snapshot updates.

Validation

  • cargo fmt
  • cargo test -p oql --test zip
  • cargo test -p oql

@dzmitry-lahoda dzmitry-lahoda changed the title [codex] add join variants add join variants and examples May 2, 2026
@dzmitry-lahoda dzmitry-lahoda marked this pull request as ready for review May 2, 2026 02:34
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 434cf0770b

ℹ️ 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".

Comment thread oql-macro/src/expand.rs Outdated
Comment thread oql-macro/src/expand.rs Outdated
@dzmitry-lahoda dzmitry-lahoda force-pushed the examples branch 2 times, most recently from 9a804ce to b9a05af Compare May 2, 2026 02:47
@dzmitry-lahoda dzmitry-lahoda changed the title add join variants and examples Add join variants and examples May 2, 2026
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.

1 participant