fix(test): resolve parameter type inconsistency in HNSW semantics test - #218
Merged
waterbro-8 merged 1 commit intoSep 17, 2026
Merged
Conversation
Use separate parameters for UUID and text representation instead of casting $1::text, which caused PostgreSQL to fail type deduction.
sun-970
requested review from
Bindy-lbb,
PeterGuy326 and
waterbro-8
as code owners
September 17, 2026 09:35
waterbro-8
approved these changes
Sep 17, 2026
waterbro-8
left a comment
Collaborator
There was a problem hiding this comment.
The $1::text reuse is a real PostgreSQL 42P08. Splitting the UUID and its text form into $1 / $5 is the right fix, and it matches the failure on #197 (TestTextANNFileSemanticsPostgres). One-file test change, no production SQL.
CI title check needed Refs #197 in the body; that is now present. Merge into codex/fix-pr-180 once the title/link job is green.
waterbro-8
pushed a commit
that referenced
this pull request
Sep 18, 2026
#218) Refs #197 Fixes the failing PostgreSQL integration test in #197. ## Problem `TestTextANNFileSemanticsPostgres` fails with: ``` ERROR: inconsistent types deduced for parameter $1 (SQLSTATE 42P08) ``` The test SQL uses `$1::text` to cast a UUID parameter to text for the `storage_key` column, but `$1` is already used as a UUID in the first position. PostgreSQL cannot deduce a consistent type for the parameter. ## Solution Use separate parameters for the UUID and its text representation instead of casting: ```sql -- Before: VALUES($1,$2,'fixture', $3,0,'fixture',$4,$1::text,$5,$5) -- After: VALUES($1,$2,'fixture',$3,0,'fixture',$4,$5,$6,$6) ``` Where `$5` is `id.String()` (the text representation) and `$6` is the timestamp. ## Validation - [x] Fix resolves the type deduction error - [ ] CI passes on this PR - [ ] Can be cherry-picked into #197 This is a minimal fix for the test infrastructure, not a change to the HNSW migration or search logic. Co-authored-by: liyuanyang <liyuanyang@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #197
Fixes the failing PostgreSQL integration test in #197.
Problem
TestTextANNFileSemanticsPostgresfails with:The test SQL uses
$1::textto cast a UUID parameter to text for thestorage_keycolumn, but$1is already used as a UUID in the first position. PostgreSQL cannot deduce a consistent type for the parameter.Solution
Use separate parameters for the UUID and its text representation instead of casting:
Where
$5isid.String()(the text representation) and$6is the timestamp.Validation
This is a minimal fix for the test infrastructure, not a change to the HNSW migration or search logic.