You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I could not get a vector store created in Cassandra (running locally in docker) The keyspace exists and I have other tables in the Cassandra cluster.
The exception repored is
cassandra.protocol.SyntaxException: <Error from server: code=2000 [Syntax error in CQL query] message="line 1:110 mismatched input '<' expecting ')' (..., body_blob TEXT, vector VECTOR[<]...)">
The stack trace is:
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\langchain_community\vectorstores\cassandra.py", line 121, in init
self.table = MetadataVectorCassandraTable(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 720, in init
super().init(*pargs, **new_kwargs)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 195, in init
super().init(*pargs, **kwargs)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 490, in init
super().init(*pargs, **kwargs)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\base_table.py", line 44, in init
self.db_setup()
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 246, in db_setup
super().db_setup()
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 498, in db_setup
super().db_setup()
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\base_table.py", line 289, in db_setup
self.execute_cql(create_table_cql, op_type=CQLOpType.SCHEMA)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\base_table.py", line 327, in execute_cql
return cast(Iterable[RowType], self.session.execute(statement, args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The CQL statement has VECTOR<str as part of the column definition and it looks to be a wrong syntax.
Thank you
The text was updated successfully, but these errors were encountered:
I22Scode
changed the title
CQL error in base_table.py line
CQL error in base_table.py line 327
May 14, 2024
Hello @I22Scode could you please check your Cassandra version? The VECTOR<float, N> syntax comes with Cassandra 5, perhaps this is the issue?
CassIO's CI runs against the "cassandra:5" Docker image, and as part of the CI integration testing statements such as the CREATE TABLE that is making your database angry are run several times.
Hi I could not get a vector store created in Cassandra (running locally in docker) The keyspace exists and I have other tables in the Cassandra cluster.
The exception repored is
cassandra.protocol.SyntaxException: <Error from server: code=2000 [Syntax error in CQL query] message="line 1:110 mismatched input '<' expecting ')' (..., body_blob TEXT, vector VECTOR[<]...)">
The stack trace is:
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\langchain_community\vectorstores\cassandra.py", line 121, in init
self.table = MetadataVectorCassandraTable(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 720, in init
super().init(*pargs, **new_kwargs)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 195, in init
super().init(*pargs, **kwargs)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 490, in init
super().init(*pargs, **kwargs)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\base_table.py", line 44, in init
self.db_setup()
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 246, in db_setup
super().db_setup()
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\mixins.py", line 498, in db_setup
super().db_setup()
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\base_table.py", line 289, in db_setup
self.execute_cql(create_table_cql, op_type=CQLOpType.SCHEMA)
File "C:\Users\Jerome\Code\ML-studies.venv\Lib\site-packages\cassio\table\base_table.py", line 327, in execute_cql
return cast(Iterable[RowType], self.session.execute(statement, args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The CQL statement has VECTOR<str as part of the column definition and it looks to be a wrong syntax.
Thank you
The text was updated successfully, but these errors were encountered: