fix(isthmus)!: index extended expression fields against the combined schema - #1286
Conversation
…chema Extended expressions share one `base_schema`, but references to fields from later tables used indices local to each table. After a three-column table, `B2` in a second table was emitted as field 1 instead of field 4. Build references in the same registration order as the combined schema, following spec v0.102.0. Closes substrait-io#1200
nielspardon
left a comment
There was a problem hiding this comment.
Retitle this fix(isthmus)!: and add a BREAKING CHANGE: footer naming the changed indices — the emitted field moves for every caller that passes more than one CREATE statement, and -c/--create is repeatable, so the CLI reaches it too. Only the title reaches CHANGELOG.md, so as titled this is invisible to downstreams, and #1161, #1169, #1171, #1189, #1151 and #1248 all carry ! plus a footer for exactly this shape. Also drop "following spec v0.102.0" from the body — v0.102.0 changed nothing about extended expressions, so the marker claims a spec change that did not happen.
The fix itself is right. The rest is inline: one design question about how the index is derived, plus test and doc suggestions.
Document the combined base_schema order, the unqualified-name rule and the duplicate-name failure on convert. Give table B a VARCHAR column so a reference read back from base_schema shows the wrong index as the wrong type, and derive each expected index from the schema rather than from the input construction.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe converter now assigns field references using each column’s position in the combined schema. Documentation describes the schema ordering and duplicate-name requirement. Tests cover indices across tables, conversions, function arguments, and round-tripped types. ChangesCombined-schema field indexing
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to References to columns in later tables now use their positions in the combined schema. No remaining issue in the supplied evidence prevents merging after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
References to columns of later tables used indices local to their own table, while
base_schemacombines all tables. Build them in the order of the combined schema.Closes #1200
BREAKING CHANGE: with more than one table, a column of any table after the first gets its index in
base_schema. WithA (A1, A2, A3)andB (B1, B2),B2is field 4, not 1. This includes the repeatable-c/--createCLI option.