dcapwell commented on code in PR #4044: URL: https://github.com/apache/cassandra/pull/4044#discussion_r2033748918
########## test/unit/org/apache/cassandra/cql3/ast/Mutation.java: ########## @@ -766,18 +847,32 @@ public UpdateBuilder set(Symbol column, Expression value) public UpdateBuilder set(String column, int value) { - return set(new Symbol(column, Int32Type.instance), Bind.of(value)); + Symbol symbol = find(column); + if (!symbol.type().equals(Int32Type.instance)) + throw new AssertionError("Expected int type but given " + symbol.type().asCQL3Type()); + return set(symbol, Bind.of(value)); + } + + public UpdateBuilder set(String column, Object value) + { + Symbol symbol = find(column); + return set(symbol, new Bind(value, symbol.type())); } public UpdateBuilder set(String column, Expression expression) { - Symbol symbol = new Symbol(metadata.getColumn(new ColumnIdentifier(column, true))); - return set(symbol, expression); + return set(find(column), expression); + } + + public UpdateBuilder set(String column, Function<Symbol, Expression> fn) Review Comment: unused in this patch, but is used in the batch patch -- 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. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org