ctubbsii commented on a change in pull request #1107:
URL: https://github.com/apache/fluo/pull/1107#discussion_r506643314
##########
File path:
modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java
##########
@@ -27,17 +27,13 @@ private TestUtil() {}
private static final Bytes ZERO = Bytes.of("0");
public static void increment(TransactionBase tx, Bytes row, Column col, int
val) {
- int prev = 0;
String prevStr = tx.get(row, col, ZERO).toString();
- prev = Integer.parseInt(prevStr);
- tx.set(row, col, Bytes.of(prev + val + ""));
+ tx.set(row, col, Bytes.of(prevStr + val));
Review comment:
Your latest change forces it to be a string concatenation with `val`. I
think it was actually supposed to be a sum first, and then converted to a
string, as in `Bytes.of(Integer.toString(Integer.parseInt(prevStr) + val))`
Sorry, I feel like I've led you down a rabbit hole. If you just want to undo
this last change, I think your previous changes were fine.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]