Skip to content

Plan D-SQLP: keep quack's NULL semantics and ternlog fusion - #1478

Merged
AdaWorldAPI merged 2 commits into
mainfrom
ccr-b576712f-pexwof
Oct 11, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
ccr-b576712f-pexwof

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

This is a follow-up to #1476, which merged before this commit was pushed. It changes the plan and board only; no code changes.

What changes in the plan

  • New decision: NULL keeps quack's semantics. The R2IL path lowers the output of Filter::sql_where, never the raw filter.
    • Three-valued WHERE therefore arrives as an ordinary mask expression over validity planes.
    • No new NULL representation, opcode family, execution layer or second evaluator.
  • W2: FoldDialect gets two changes that nullable WHERE and ternlog fusion depend on.
    • Wire IntOr onto MaskOp::Or. It is unwired today, and sql_where emits OR.
    • Pass a procedure body's Boolean calls to mask-risc's fuse instead of emitting one MaskOp per call. This matches what quack's lower_fused does.
  • W5: every case in quack's tests/sql_null_3vl.rs also runs through the procedure path, checked against the same row-by-row three-valued oracle.
    • The resulting Program must be byte-identical to lower_fused(sql_where(f)).
  • W7: four separately scoped NULL extensions: NULL literals, COALESCE, NULLIF, nullable arithmetic.
    • Each one lands as a failing case in sql_null_3vl.rs's oracle first, then in the procedures.
  • Non-goals: no second NULL representation and no second three-valued evaluator.

Checks run

  • plan_dids.py passes.
  • SUPERSESSION-INDEX.md regenerated; it is unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_015JH7YkXs5us6g3tG8NiFfP


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified the planned handling of nullable filters, validity gates, and Boolean fusion.
    • Added requirements for nullable-predicate parity tests and byte-for-byte checks of fused lowering.
    • Scoped future NULL-related extensions and documented that a separate NULL representation and 3VL evaluator are out of scope.
    • Updated deliverables to include IntOr support and fused Boolean operations.

The R2IL path lowers Filter::sql_where's output, so three-valued WHERE
arrives as an ordinary mask expression over validity planes: no new NULL
representation, opcode family or evaluator. FoldDialect wires IntOr and
hands a body's Boolean calls to mask-risc's fuse, as lower_fused does.
W5 runs quack's sql_null_3vl.rs cases through the procedure path against
the same Kleene oracle, byte-identical to lower_fused(sql_where(f)).
NULL literals, COALESCE, NULLIF and nullable arithmetic are scoped W7
extensions, oracle-first.

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

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 4302629e-4dd0-49af-823f-667c8bf0ce13

📥 Commits

Reviewing files that changed from the base of the PR and between 5a9e8f4 and 32c26d6.


📒 Files selected for processing (2)
  • .claude/board/STATUS_BOARD.md
  • .claude/plans/sql-polyfill-r2il-v1.md

 ________________________________________________________________________________
< Please don't use comments to explain what code should be doing. Make it do it. >
 --------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 11, 2026 09:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-10-11T09:21:43.482699Z 32c26d6 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.

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

Copy link
Copy Markdown

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: 32c26d6162

ℹ️ 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 .claude/plans/sql-polyfill-r2il-v1.md Outdated
Comment thread .claude/plans/sql-polyfill-r2il-v1.md Outdated
Comment thread .claude/plans/sql-polyfill-r2il-v1.md Outdated
- FoldDialect keeps quack's two pinned shapes: in-place (lower) and fused
  (lower_fused); W5 byte-identity is per mode.
- NULL extensions are predicate rewrites that expand into validity-mask
  algebra; value-producing forms and nullable arithmetic are OPEN (need a
  derived value lane), IntAdd stays scalar-only.
- sql_null_3vl.rs MinI32/MaxI32 cases join W5 only after W7's MIN/MAX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015JH7YkXs5us6g3tG8NiFfP
@AdaWorldAPI
AdaWorldAPI merged commit f5ba476 into main Oct 11, 2026
4 checks passed
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