This also is a fix for AstraDB, which throws an exception if you try to CREATE KEYSPACE IF NOT EXISTS …

This PR looks like more change than it really is.

It is actually only two lines, the body of both the ensureKeyspaceExists() and ensureTableExists(..) methods are wrapped in an if statement.

  • https://github.com/spring-projects/spring-ai/blob/c07663a3effb2e7cfee24943777b33b3f7d09f42/vector-stores/spring-ai-cassandra/src/main/java/org/springframework/ai/vectorstore/CassandraVectorStoreConfig.java#L471
  • https://github.com/spring-projects/spring-ai/blob/c07663a3effb2e7cfee24943777b33b3f7d09f42/vector-stores/spring-ai-cassandra/src/main/java/org/springframework/ai/vectorstore/CassandraVectorStoreConfig.java#L568