Skip to content

Commit 90c5b4c

Browse files
committed
CDM-92: Fixed naming & SIT tests
1 parent 3a79aaf commit 90c5b4c

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Read Record Count: 6
1+
Read Record Count: 7
22
Mismatch Record Count: 2
33
Corrected Mismatch Record Count: 2
44
Missing Record Count: 1
55
Corrected Missing Record Count: 0
6-
Valid Record Count: 3
6+
Valid Record Count: 4
77
Skipped Record Count: 0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Read Record Count: 6
1+
Read Record Count: 7
22
Mismatch Record Count: 0
33
Corrected Mismatch Record Count: 0
44
Missing Record Count: 1
55
Corrected Missing Record Count: 1
6-
Valid Record Count: 5
6+
Valid Record Count: 6
77
Skipped Record Count: 0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Read Record Count: 6
1+
Read Record Count: 7
22
Skipped Record Count: 0
3-
Write Record Count: 6
3+
Write Record Count: 7
44
Error Record Count: 0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Read Record Count: 6
1+
Read Record Count: 7
22
Mismatch Record Count: 0
33
Corrected Mismatch Record Count: 0
44
Missing Record Count: 0
55
Corrected Missing Record Count: 0
6-
Valid Record Count: 6
6+
Valid Record Count: 7
77
Skipped Record Count: 0

SIT/smoke/04_counters/expected.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
record2 | 11 | 20
77
record6 | 500 | null
88
record1 | 1 | 2
9+
record7 | 1 | 2
910
record4 | 10000 | 20001
1011

11-
(6 rows)
12+
(7 rows)

src/main/java/com/datastax/cdm/cql/statement/TargetUpdateStatement.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ protected BoundStatement bind(Row originRow, Row targetRow, Integer ttl, Long wr
4242
boundStatement = boundStatement.set(currentBindIndex++, writeTime, Long.class);
4343
}
4444

45-
Object bindValueOrigin = null;
45+
Object originValue, targetValue;
4646
Object bindValueTarget = null;
4747
for (int targetIndex : columnIndexesToBind) {
4848
int originIndex = cqlTable.getCorrespondingIndex(targetIndex);
4949

5050
try {
5151
if (usingCounter && counterIndexes.contains(targetIndex)) {
52-
bindValueOrigin = cqlTable.getOtherCqlTable().getData(originIndex, originRow);
53-
if (null == bindValueOrigin) {
52+
originValue = cqlTable.getOtherCqlTable().getData(originIndex, originRow);
53+
if (null == originValue) {
5454
currentBindIndex++;
5555
continue;
5656
}
57-
bindValueTarget = (null == targetRow ? 0L : cqlTable.getData(targetIndex, targetRow));
58-
bindValueTarget = ((Long) bindValueOrigin - (null == bindValueTarget ? 0L : (Long) bindValueTarget));
57+
targetValue = (null == targetRow ? 0L : cqlTable.getData(targetIndex, targetRow));
58+
bindValueTarget = ((Long) originValue - (null == targetValue ? 0L : (Long) targetValue));
5959
}
6060
else if (targetIndex== explodeMapKeyIndex) {
6161
bindValueTarget = explodeMapKey;
@@ -70,8 +70,7 @@ else if (targetIndex== explodeMapValueIndex) {
7070
}
7171

7272
boundStatement = boundStatement.set(currentBindIndex++, bindValueTarget, cqlTable.getBindClass(targetIndex));
73-
}
74-
catch (Exception e) {
73+
} catch (Exception e) {
7574
logger.error("Error trying to bind value:" + bindValueTarget + " to column:" +
7675
targetColumnNames.get(targetIndex) + " of targetDataType:" + targetColumnTypes.get(targetIndex) + "/"
7776
+ cqlTable.getBindClass(targetIndex).getName() + " at column index:" + targetIndex);

0 commit comments

Comments
 (0)