Skip to content

Fix binary op base cases#2132

Merged
shangyian merged 1 commit into
DataJunction:mainfrom
shangyian:fix-ast-base
May 19, 2026
Merged

Fix binary op base cases#2132
shangyian merged 1 commit into
DataJunction:mainfrom
shangyian:fix-ast-base

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented May 16, 2026

Summary

Fixes a latent contract bug in ast.BinaryOp.And and tightens up the few call sites that were already working around it with extra branching.

After this fix, BinaryOp.And(...) can now handle 0/1/N arguments:

  • And() (no args) returns None
  • And(x) returns x
  • And(x, y, …) returns a folded BinaryOp

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit a206c0b
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a07ba3cb5350800086770b0

@shangyian shangyian marked this pull request as ready for review May 19, 2026 03:46
@shangyian shangyian merged commit a3b8d0a into DataJunction:main May 19, 2026
21 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.

1 participant