Skip to content

Conversation

@robacourt
Copy link
Contributor

Support multiple subqueries at the same level in shape where clauses (e.g., x IN (subquery) AND y IN (subquery)), addressing #3675.

Previously, shapes with multiple same-level subqueries were rejected with a 400 error. This PR removes that restriction and:

  • Updates DependencyLayers to correctly layer shapes with multiple dependencies by placing them after all dependencies are found (1 + max layer of all dependencies)
  • Fixes extract_subqueries to preserve AST traversal order
  • Returns 409 (shape invalidation) on move-in/out operations for shapes with multiple same-level subqueries, since we cannot correctly determine which dependency caused the change

@robacourt robacourt marked this pull request as ready for review January 6, 2026 13:29
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.91%. Comparing base (393eca2) to head (413eebf).
⚠️ Report is 11 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3676   +/-   ##
=======================================
  Coverage   87.91%   87.91%           
=======================================
  Files          22       22           
  Lines        1820     1820           
  Branches      458      460    +2     
=======================================
  Hits         1600     1600           
  Misses        218      218           
  Partials        2        2           
Flag Coverage Δ
packages/experimental 87.73% <ø> (ø)
packages/react-hooks 86.48% <ø> (ø)
packages/start 89.58% <ø> (ø)
packages/typescript-client 93.66% <ø> (ø)
packages/y-electric 56.05% <ø> (ø)
typescript 87.91% <ø> (ø)
unit-tests 87.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blacksmith-sh

This comment has been minimized.

@robacourt robacourt force-pushed the rob/support-multiple-subqueries-at-same-level branch from 4384d80 to 413eebf Compare January 6, 2026 13:37
@blacksmith-sh

This comment has been minimized.

@robacourt robacourt self-assigned this Jan 6, 2026
@robacourt robacourt merged commit b11b8ea into main Jan 8, 2026
52 of 54 checks passed
@robacourt robacourt deleted the rob/support-multiple-subqueries-at-same-level branch January 8, 2026 10:26
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