xiedeyantu commented on code in PR #5075:
URL: https://github.com/apache/calcite/pull/5075#discussion_r3523475785
##########
cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraFilter.java:
##########
@@ -302,7 +302,7 @@ private String translateOp2(String op, String name,
RexLiteral right) {
requireNonNull(rowType.getField(name, true, false));
SqlTypeName typeName = field.getType().getSqlTypeName();
if (typeName != SqlTypeName.CHAR) {
- valueString = "'" + valueString + "'";
+ valueString = "'" + valueString.replace("'", "''") + "'";
Review Comment:
If the value is `I''m fine`, I think `replace` will return an unexpected
results.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]