Skip to content

Commit e940045

Browse files
committed
CDM-53 : fixing broken build, and incorporating review feedback
1 parent 3913fe4 commit e940045

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/main/java/com/datastax/cdm/data/CqlData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static boolean isFrozen(DataType dataType) {
6969
if (dataType instanceof ListType) return ((ListType) dataType).isFrozen();
7070
if (dataType instanceof SetType) return ((SetType) dataType).isFrozen();
7171
if (dataType instanceof MapType) return ((MapType) dataType).isFrozen();
72-
if (dataType instanceof TupleType) return dataType.asCql(true, false).contains("frozen<");
72+
if (dataType instanceof TupleType) return dataType.asCql(true, false).toLowerCase().contains("frozen<");
7373
return false;
7474
}
7575

src/main/java/com/datastax/cdm/feature/WritetimeTTL.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ public class WritetimeTTL extends AbstractFeature {
3131

3232
@Override
3333
public boolean loadProperties(IPropertyHelper propertyHelper) {
34+
this.autoTTLNames = propertyHelper.getBoolean(KnownProperties.ORIGIN_TTL_AUTO);
3435
this.ttlNames = getTTLNames(propertyHelper);
3536
if (null!=this.ttlNames && !this.ttlNames.isEmpty()) {
3637
logger.info("PARAM -- TTLCols: {}", ttlNames);
38+
this.autoTTLNames = false;
3739
}
3840

39-
this.autoTTLNames = propertyHelper.getBoolean(KnownProperties.ORIGIN_TTL_AUTO);
41+
this.autoWritetimeNames = propertyHelper.getBoolean(KnownProperties.ORIGIN_WRITETIME_AUTO);
4042
this.writetimeNames = getWritetimeNames(propertyHelper);
4143
if (null!=this.writetimeNames && !this.writetimeNames.isEmpty()) {
4244
logger.info("PARAM -- WriteTimestampCols: {}", writetimeNames);
43-
this.autoTTLNames = false;
45+
this.autoWritetimeNames = false;
4446
}
4547

46-
this.autoWritetimeNames = propertyHelper.getBoolean(KnownProperties.ORIGIN_WRITETIME_AUTO);
4748
this.customWritetime = getCustomWritetime(propertyHelper);
4849
if (this.customWritetime > 0) {
4950
logger.info("PARAM -- {}: {} datetime is {} ", KnownProperties.TRANSFORM_CUSTOM_WRITETIME, customWritetime, Instant.ofEpochMilli(customWritetime / 1000));
50-
this.autoWritetimeNames = false;
5151
}
5252

5353
this.writetimeIncrement = propertyHelper.getLong(KnownProperties.TRANSFORM_CUSTOM_WRITETIME_INCREMENT);
@@ -115,10 +115,12 @@ public boolean initializeAndValidate(CqlTable originTable, CqlTable targetTable)
115115

116116
if (autoTTLNames) {
117117
this.ttlNames = originTable.getWritetimeTTLColumns();
118+
logger.info("PARAM -- Automatic TTLCols: {}", ttlNames);
118119
}
119120

120121
if (autoWritetimeNames) {
121122
this.writetimeNames = originTable.getWritetimeTTLColumns();
123+
logger.info("PARAM -- Automatic WriteTimestampCols: {}", writetimeNames);
122124
}
123125

124126
validateTTLColumns(originTable);

0 commit comments

Comments
 (0)