Skip to content

lance-graph-xlog cube: add_relation for derived relations - #1912

Merged
AdaWorldAPI merged 2 commits into
mainfrom
ccr-85acaff0-oszq40-cube-add
Nov 1, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
ccr-85acaff0-oszq40-cube-add

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Adds Cube::add_relation(table, tuples) -> RelId. A rule's output, or a fixpoint delta, enters the cube as one more relation under the cube's existing frame:

  • Only the new tuples' ids are looked up, once each.
  • Relations already in the cube are not touched.
  • An id outside the shared map, or a stale frame, is refused.

XLOG's recursive rules and its rules that read derived relations need this. Those are 141 of the 218 rules the cube currently refuses (xlog#2). Recursion follows in xlog#2, using this.

Test

an_added_relation_joins_like_a_base_one:

  • An added relation joins a base relation on swapped columns, and the result matches an enumeration oracle.
  • The map's lookup counter grows by exactly two per added tuple.
  • An id outside the map is refused with Domain.
  • A stale frame is refused with Map(Stale).

Also in this PR

main's generated entries index was stale after the #1909 merge. The index check failed on a clean main checkout, so it is regenerated here.


Generated by Claude Code

…ube's frame

A rule's output or a fixpoint delta enters the cube as one more relation:
its ids are looked up once in the shared map, existing relations are not
touched, an id outside the map or a stale frame is refused. Needed for
recursive and derived-input rules in XLOG's plans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
…rge)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83b20d90-d6f0-40da-a5e0-86aa170190fc
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 1, 2026 04:10
@AdaWorldAPI
AdaWorldAPI merged commit e3e4cd9 into main Nov 1, 2026
11 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T04:11:16.148087Z 3f71f6f Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

2 participants