-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Bug description
When doing a similaritySearch
using the VectorStore
on a database where the schema name contains a -
i run into an exception.
PreparedStatementCallback; bad SQL grammar [SELECT *, embedding <=> ? AS distance FROM demo-1998.vector_store WHERE embedding <=> ? < ? AND metadata::jsonb @@ '($.entityType == "PROCESS" ...)'::jsonpath ORDER BY distance LIMIT ? ]
I'm pretty sure that it is related to the schema name here. A possible fix could be wrapping the schema name in "
on SpringAI side.
Environment
Dependencies using Spring Boot 3.5.4 and Java 20
implementation("org.springframework.ai:spring-ai-starter-mcp-server-webmvc")
implementation("org.springframework.ai:spring-ai-starter-model-azure-openai")
implementation("org.springframework.ai:spring-ai-starter-vector-store-pgvector")
Steps to reproduce
- Do a
similaritySearch
call on a database schema which has a-
in its name
Expected behavior
No exceptions are thrown