While Executing Prepared statements form application, we are observing the above-mentioned error from the driver.
DSE Version:- 5.1.5
DSE Java Driver :- 1.6.7
While Executing Prepared statements form application, we are observing the above-mentioned error from the driver.
DSE Version:- 5.1.5
DSE Java Driver :- 1.6.7
@bb.addagada_90355 Based on the minimal information you provided, my guess is that your queries don't list the columns (use of wildcards) in this manner:
SELECT * FROM ... WHERE ...
If at some point the schema for the table changes, it no longer matches the schema of the cached prepared statement so the values being returned is not what the driver expected.
The best practice is to explicitly enumerate the columns you want to retrieve from the table so the application gets exactly the columns it expects. For example:
SELECT col1, col2, col3 FROM ... WHERE ...
This should prevent the prepared statements from getting out-of-sync with the schema. Cheers!
3 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use