aratno commented on code in PR #2029:
URL: 
https://github.com/apache/cassandra-java-driver/pull/2029#discussion_r2175022437


##########
query-builder/src/test/java/com/datastax/oss/driver/api/querybuilder/schema/CreateTableTest.java:
##########


Review Comment:
   Would you be open to adding an integration test to check query-builder 
paths? It would be good to get a test failure on future syntax changes like 
this one, rather than discovering the issue later when attempting to startup an 
application on the newer Cassandra version. You could follow 
`com.datastax.oss.driver.querybuilder.JsonInsertIT` as an example.



##########
query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/schema/RelationOptions.java:
##########
@@ -58,6 +58,20 @@ default SelfT withCDC(boolean enabled) {
     return withOption("cdc", enabled);
   }
 
+  /**
+   * Defines the crc check chance.
+   *
+   * <p>Note that using this option with a version of Apache Cassandra less 
than 3.0 will raise a
+   * syntax error.
+   *
+   * <p>If no call is made to this method, the default value set is 0.99.

Review Comment:
   Looks like the default is 1.0, not 0.99. The default is decided on the 
server and is documented here: 
https://cassandra.apache.org/doc/latest/cassandra/reference/cql-commands/create-table.html
   
   You can remove this part of the docstring.



##########
query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/schema/RelationOptions.java:
##########
@@ -185,19 +252,30 @@ default SelfT withCompression(@NonNull String 
compressionAlgorithmName) {
   }
 
   /**
-   * Configures compression using the given algorithm, chunk length and crc 
check chance.
+   * Configures compression using the given algorithm, chunk length.
    *
    * <p>Unless specifying a custom compression algorithm implementation, it is 
recommended to use
    * {@link #withLZ4Compression()}, {@link #withSnappyCompression()}, or {@link
    * #withDeflateCompression()}.
    *
    * @param compressionAlgorithmName The class name of the compression 
algorithm.
    * @param chunkLengthKB The chunk length in KB of compression blocks. 
Defaults to 64.
-   * @param crcCheckChance The probability (0.0 to 1.0) that checksum will be 
checked on each read.
-   *     Defaults to 1.0.
    */
   @NonNull
   @CheckReturnValue
+  default SelfT withCompression(@NonNull String compressionAlgorithmName, int 
chunkLengthKB) {
+    return withOption(
+        "compression",
+        ImmutableMap.of("class", compressionAlgorithmName, 
"chunk_length_in_kb", chunkLengthKB));
+  }
+
+  /**
+   * @deprecated This method only exists for backward compatibility. Will not 
work with Apache
+   *     Cassandra 5.0 or later. Use {@link #withCompression(String, int)} 
instead.

Review Comment:
   For these docstrings that indicate version support, could you update to 
include a reference to the relevant Jira?
   ```suggestion
      *     Cassandra 5.0 or later due to removal of deprecated table 
properties (<a 
href="https://issues.apache.org/jira/browse/CASSANDRA-18742";>CASSANDRA-18742</a>).
 Use {@link #withCompression(String, int)} instead.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to