Skip to content

test(singlestore): add semantic search integration test#2900

Open
duwenxin99 wants to merge 1 commit intomainfrom
feat/singlestore-semantic-search
Open

test(singlestore): add semantic search integration test#2900
duwenxin99 wants to merge 1 commit intomainfrom
feat/singlestore-semantic-search

Conversation

@duwenxin99
Copy link
Copy Markdown
Contributor

No description provided.

@duwenxin99 duwenxin99 requested a review from a team as a code owner March 30, 2026 18:21
@duwenxin99 duwenxin99 changed the title feat(singlestore): implement semantic vector search test(singlestore): add semantic search integration test Mar 30, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces semantic search support for SingleStore. Key changes include updating the CI pipeline to handle an API key, configuring the SingleStore tools to use the correct vector formatting for embeddings, and adding integration tests for semantic search. A technical issue was identified in the integration test SQL query where the embedding column needs explicit conversion using JSON_ARRAY_UNPACK to be compatible with the DOT_PRODUCT function.

searchStmt := `
SELECT content
FROM senseai_docs
ORDER BY DOT_PRODUCT(embedding, JSON_ARRAY_UNPACK(?)) DESC
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In SingleStore, the DOT_PRODUCT function requires arguments of type VECTOR or BLOB. Since the embedding column is defined as JSON (on line 248), it must be explicitly converted using JSON_ARRAY_UNPACK() to be compatible with the function. Without this conversion, the query will fail with a type mismatch error.

Suggested change
ORDER BY DOT_PRODUCT(embedding, JSON_ARRAY_UNPACK(?)) DESC
ORDER BY DOT_PRODUCT(JSON_ARRAY_UNPACK(embedding), JSON_ARRAY_UNPACK(?)) DESC

@duwenxin99 duwenxin99 mentioned this pull request Mar 30, 2026
1 task
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.

2 participants