[
https://issues.apache.org/jira/browse/CAMEL-26215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Cosentino reassigned CAMEL-26215:
----------------------------------------
Assignee: Andrea Cosentino
> camel-pgvector - a vector as a List of Double (as JSON gives) fails with
> ClassCastException
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-26215
> URL: https://issues.apache.org/jira/browse/CAMEL-26215
> Project: Camel
> Issue Type: Bug
> Components: camel-ai
> Reporter: Claus Ibsen
> Assignee: Andrea Cosentino
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of weaviate, pinecone and pgvector
> (CAMEL-24961, PR #28402).
> h4. 1. A List of Double vector fails with ClassCastException
> A vector given as a List of Double (what a JSON array unmarshals to) fails
> with a raw {{ClassCastException}}: {{PgVectorProducer}} (main 2a465aa4814c,
> lines 151 and 201) reads the body as {{List<Float>}} and {{toFloatArray}}
> (line 258) assigns each element to a {{Float}}, for UPSERT and
> SIMILARITY_SEARCH. Checked on 4.24.0-SNAPSHOT with the camel-test-infra
> pgvector container. camel-weaviate and camel-pinecone have the same problem.
> Proposed: convert each element with {{Number.floatValue()}} (and accept
> {{float[]}}).
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)