Keyspace `keyspace` does not exist when preparing a query statement, when we use a case sensitive keyspace name inside the query directly.

Description

As seen from the attached photo below we are directly using the keyspace name inside of our query.
We have set that we want to use case sensitive keyspace “CassandraEventStoreTests“

When we prepare the query statement we get the following error:
”keyspace cassandraeventstoretests does not exists”

here is the inner exception:

It seems like somewhere in the drive the query is made .ToLower() and this is causing issues when working with case sensitive keyspaces (as seen from the screenshot the session.Keyspace is the correct one).

If we instead prepare the query like this:

and we DON'T specify the keyspace inside the query directly, it is working as expected.

Environment

None

Attachments

3

Activity

Show:

Kalina Shupeva 
January 27, 2025 at 12:02 PM

Yes, thank you! If the keyspace is CamelCase and created with ““ , it only then becomes case sensetive when querying.

Joao Reis 
January 24, 2025 at 2:37 PM

This is not a driver issue, it’s how CQL works. If you try running INSERT INTO CassandraEventStoreTests.events (....) in cqlsh directly it will also fail. You have to use quotation marks: INSERT INTO "CassandraEventStoreTests".events (....) . Try it and see if it resolves the issue.

Not a Problem

Details

Assignee

Reporter

Reproduced in

Affects versions

Priority

Created January 24, 2025 at 2:06 PM
Updated January 27, 2025 at 4:25 PM
Resolved January 27, 2025 at 4:25 PM