Skip to content

Commit 4051431

Browse files
committed
Implemented PR recomendations
1 parent 4d88a6c commit 4051431

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ This mode is specifically useful to processes a subset of partition-ranges that
123123
- Supports adding custom fixed `writetime`
124124

125125
# Known Limitations
126-
- This tool does not migrate `ttl` & `writetime` for every field-level (for optimization reasons), but it instead it finds the field with the highest `ttl` & `writetime` and uses those values for `ttl` & `writetime` on the entire Target row
126+
- This tool does not migrate `ttl` & `writetime` at the field-level (for optimization reasons). It instead finds the field with the highest `ttl` & the field with the highest `writetime` within an `origin` row and uses those values on the entire `target` row.
127127

128128
# Building Jar for local development
129129
1. Clone this repo

src/main/java/datastax/astra/migrate/GuardrailJobSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ protected GuardrailJobSession(CqlSession session, SparkConf sc) {
3232
sourceKeyspaceTable.split("\\.")[1], Util.getSparkPropOrEmpty(sc, "spark.query.origin"));
3333
String selectCols = String.join(",", tableInfo.getAllColumns());
3434
String partitionKey = String.join(",", tableInfo.getPartitionKeyColumns());
35-
String originSelectQry = "select " + selectCols + " from " + sourceKeyspaceTable +
36-
" where token(" + partitionKey + ") >= ? and token(" + partitionKey + ") <= ? " +
35+
String originSelectQry = "SELECT " + selectCols + " FROM " + sourceKeyspaceTable +
36+
" WHERE TOKEN(" + partitionKey + ") >= ? AND TOKEN(" + partitionKey + ") <= ? " +
3737
sourceSelectCondition + " ALLOW FILTERING";
3838

3939
logger.info("PARAM -- Detected Table Schema: {}", tableInfo);

src/main/java/datastax/astra/migrate/schema/ColumnInfo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import lombok.Data;
66

77
import java.util.List;
8+
import java.util.Locale;
89
import java.util.Map;
910
import java.util.Set;
1011

@@ -32,7 +33,7 @@ public class ColumnInfo {
3233
if (typeInfo.getTypeClass().equals(UdtValue.class)) {
3334
isUDT = true;
3435
}
35-
if (cm.getType().toString().contains(", frozen")) {
36+
if (cm.getType().toString().toLowerCase(Locale.ROOT).contains(", frozen")) {
3637
isFrozen = true;
3738
}
3839
}

0 commit comments

Comments
 (0)