Skip to content

HIR planning: Also cast element type after CastInt2VectorToArray#35015

Open
ggevay wants to merge 1 commit intoMaterializeInc:mainfrom
ggevay:CastInt2VectorToArray-element-type
Open

HIR planning: Also cast element type after CastInt2VectorToArray#35015
ggevay wants to merge 1 commit intoMaterializeInc:mainfrom
ggevay:CastInt2VectorToArray-element-type

Conversation

@ggevay
Copy link
Contributor

@ggevay ggevay commented Feb 14, 2026

Fixes https://github.com/MaterializeInc/database-issues/issues/10087 and https://github.com/MaterializeInc/database-issues/issues/10088. The bug was that our
The Int2Vector to Array cast used to just blindly say that the cast succeeds by simply adding a call to CastInt2VectorToArray without regard to the Array's element type. The fix is to check the Array element type, and if it's not Int2, then additionally insert an array to array cast that attends to the element type (or fail the cast if the element types are not castable).

Btw. Junie (RustRover's AI agent) with Opus 4.6 oneshotted the fix in <5 minutes, which I think is super impressive. I only needed to adjust the tests and the code comment, plus manually tested Postgres compat.

@ggevay ggevay added the A-ADAPTER Topics related to the ADAPTER layer label Feb 14, 2026
@github-actions
Copy link

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

@ggevay ggevay force-pushed the CastInt2VectorToArray-element-type branch from eeeb926 to b5a48b8 Compare February 14, 2026 11:03
@ggevay ggevay marked this pull request as ready for review February 14, 2026 11:04
@ggevay ggevay requested a review from a team as a code owner February 14, 2026 11:04
@ggevay ggevay requested a review from SangJunBak February 14, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ADAPTER Topics related to the ADAPTER layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant