Support scoped scalar and tuple IN subqueries - #45
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
==========================================
+ Coverage 89.47% 89.78% +0.30%
==========================================
Files 63 64 +1
Lines 10480 10729 +249
==========================================
+ Hits 9377 9633 +256
+ Misses 631 626 -5
+ Partials 472 470 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
AI Review SummaryVerdict: ✅ No critical issues found Critical issuesNo critical issues found. Other findings
This review was generated automatically. Critical issues require attention; other findings are advisory. |
|
Analysis performed by claude, z-ai/glm-5.3-flash. |
Noncorrelated
IN (SELECT ...)queries previously resolved inner columns and parameters against the outer relation, producing misleading missing-column or List-operand diagnostics. This implements the first scalar and tuple-key stages of #32 using the existing SELECT analyzer with independent scopes. WHERE predicates support one scalar or tuple-valued output column, nullable keys, shared parameters, nested membership, and applicable DML; correlated queries and unsupported contexts fail explicitly.The jOOQ DSL renders scalar subqueries with typed query parts and scoped table mappings. Tuple subqueries retain their original YQL through the existing explicit-DECLARE JDBC path; the DSL rejects them because its row constructor changes the required YQL projection. Booktest adds read and mutation examples, generated for all 18 runtime profiles and included in the shared build checks.
Validation:
make check, published Java/jOOQ and Kotlin SDK builds, and sequential generated native Go, database/sql and jOOQ execution against local YDB 26.3.1.16. The live tests cover empty and nullable inputs, composite keys, alias shadowing, numeric types, mutations and table mappings; stable/nightly CI now includes the suite and its integration coverage. The checked-in Booktest queries also execute through both Go profiles.The pinned server exhibited false-positive filtering for a tuple mixing primary-key and non-key columns. The exact observation and reproducer are documented in
.agents/yql-evidence.md; the generator does not rewrite SQL to mask it. Full composite keys and the all-non-key tuple example were verified separately.Part of #32; keep the issue open for derived FROM/JOIN sources, named SELECT bindings and collection aggregation. Independent scope metadata is necessary to distinguish aliases reused by different SELECTs; this reuses direct parser contexts and the existing semantic core without adding an intermediate AST or a runtime execution layer.