Skip to content

Commit abed4c2

Browse files
committed
JAVA-1685: Clarify recommendation on preparing SELECT *
1 parent 1f57d1f commit abed4c2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

changelog/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- [improvement] JAVA-1671: Remove unnecessary test on prepared statement metadata.
66
- [bug] JAVA-1694: Upgrade to jackson-databind 2.7.9.2 to address CVE-2015-15095.
7+
- [documentation] JAVA-1685: Clarify recommendation on preparing SELECT *.
78

89
Merged from 3.3.x:
910

manual/statements/prepared/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,9 @@ is currently no mechanism for Cassandra to invalidate the existing metadata. Be
249249
the driver is not able to properly react to these changes and will improperly read rows after
250250
a schema change is made.
251251
252-
Therefore it is currently recommended to not create prepared statements
253-
for 'SELECT *' queries if you plan on making schema changes involving
254-
adding or dropping columns. Alternatively you should list all columns of interest
255-
in your statement, i.e.: `SELECT a, b, c FROM tbl`.
252+
Therefore it is currently recommended to list all columns of interest in
253+
your prepared statements (i.e. `SELECT a, b, c FROM table`), instead of
254+
relying on `SELECT *`.
256255
257256
This will be addressed in a future release of both Cassandra and the driver. Follow
258257
[CASSANDRA-10786] and [JAVA-1196] for more information.
@@ -264,4 +263,4 @@ This will be addressed in a future release of both Cassandra and the driver. Fo
264263
[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement-
265264
[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement-
266265
[CASSANDRA-10786]: https://issues.apache.org/jira/browse/CASSANDRA-10786
267-
[JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196
266+
[JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196

0 commit comments

Comments
 (0)