wangtiga commented on code in PR #25033:
URL: https://github.com/apache/shardingsphere/pull/25033#discussion_r1160396121
##########
sql-parser/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/impl/PostgreSQLStatementSQLVisitor.java:
##########
@@ -350,7 +350,7 @@ private Optional<String> findBinaryOperator(final
AExprContext ctx) {
}
private BinaryOperationExpression
createPatternMatchingOperationSegment(final AExprContext ctx) {
- String operator = getOriginalText(ctx.patternMatchingOperator());
+ String operator =
getOriginalText(ctx.patternMatchingOperator()).toUpperCase();
Review Comment:
Could you please help me confirm if my understanding is correct that the
keywords passed into the`createPatternMatchingOperationSegment` function and
the generated `BinaryOperationExpression` are only used for logical judgment
and will not affect the rewritten SQL statements?
Thank you in advance for your kind assistance.
```txt
patternMatchingOperator
: LIKE
| TILDE_TILDE_
| NOT LIKE
| NOT_TILDE_TILDE_
| ILIKE
| ILIKE_
| NOT ILIKE
| NOT_ILIKE_
| SIMILAR TO
| NOT SIMILAR TO
| TILDE_
| NOT_ TILDE_
| TILDE_ ASTERISK_
| NOT_ TILDE_ ASTERISK_
;
```
https://github.com/apache/shardingsphere/blob/5.3.1/sql-parser/dialect/postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4#L530
--
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]