Skip to content

Commit 38c501d

Browse files
committed
CDM-92: Used consistent variable names (origin & target)
1 parent 22daff1 commit 38c501d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

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

45-
Object bindValueOrg = null;
46-
Object bindValueDest = null;
45+
Object bindValueOrigin = null;
46+
Object bindValueTarget = null;
4747
for (int targetIndex : columnIndexesToBind) {
4848
int originIndex = cqlTable.getCorrespondingIndex(targetIndex);
4949

5050
try {
5151
if (usingCounter && counterIndexes.contains(targetIndex)) {
52-
bindValueOrg = cqlTable.getOtherCqlTable().getData(originIndex, originRow);
53-
if (null == bindValueOrg) {
52+
bindValueOrigin = cqlTable.getOtherCqlTable().getData(originIndex, originRow);
53+
if (null == bindValueOrigin) {
5454
currentBindIndex++;
5555
continue;
5656
}
57-
bindValueDest = (null == targetRow ? 0L : cqlTable.getData(targetIndex, targetRow));
58-
bindValueDest = ((Long) bindValueOrg - (null == bindValueDest ? 0L : (Long) bindValueDest));
57+
bindValueTarget = (null == targetRow ? 0L : cqlTable.getData(targetIndex, targetRow));
58+
bindValueTarget = ((Long) bindValueOrigin - (null == bindValueTarget ? 0L : (Long) bindValueTarget));
5959
}
6060
else if (targetIndex== explodeMapKeyIndex) {
61-
bindValueDest = explodeMapKey;
61+
bindValueTarget = explodeMapKey;
6262
}
6363
else if (targetIndex== explodeMapValueIndex) {
64-
bindValueDest = explodeMapValue;
64+
bindValueTarget = explodeMapValue;
6565
} else {
6666
if (originIndex < 0)
6767
// we don't have data to bind for this column; continue to the next targetIndex
6868
continue;
69-
bindValueDest = cqlTable.getOtherCqlTable().getAndConvertData(originIndex, originRow);
69+
bindValueTarget = cqlTable.getOtherCqlTable().getAndConvertData(originIndex, originRow);
7070
}
7171

72-
boundStatement = boundStatement.set(currentBindIndex++, bindValueDest, cqlTable.getBindClass(targetIndex));
72+
boundStatement = boundStatement.set(currentBindIndex++, bindValueTarget, cqlTable.getBindClass(targetIndex));
7373
}
7474
catch (Exception e) {
75-
logger.error("Error trying to bind value:" + bindValueDest + " to column:" +
75+
logger.error("Error trying to bind value:" + bindValueTarget + " to column:" +
7676
targetColumnNames.get(targetIndex) + " of targetDataType:" + targetColumnTypes.get(targetIndex) + "/"
7777
+ cqlTable.getBindClass(targetIndex).getName() + " at column index:" + targetIndex);
7878
throw e;

0 commit comments

Comments
 (0)