kanha-gupta commented on code in PR #25424:
URL: https://github.com/apache/shardingsphere/pull/25424#discussion_r1185733719
##########
sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/MySQLStatementVisitor.java:
##########
@@ -441,7 +446,9 @@ public final ASTNode visitBooleanPrimary(final
BooleanPrimaryContext ctx) {
ExpressionSegment right = new
LiteralExpressionSegment(ctx.IS().getSymbol().getStopIndex() + 2,
ctx.stop.getStopIndex(), rightText);
String text = ctx.start.getInputStream().getText(new
Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex()));
ExpressionSegment left = (ExpressionSegment)
visit(ctx.booleanPrimary());
- String operator = "IS";
+ if (null != ctx.NULL()) {
+ right = null;
Review Comment:
@strongduanmu Sir, I tried it. The problem I am encountering is that
Calcite's SqlStdOperatorTable do not have "IS" as a function or
PostFixOperator. Therefore While breaking "IS NULL" into "IS" as operator &
"NULL" in right as LiteralExpressionSegment, It gives error "IS" is not
supported.
Same problem is for "IS NOT NULL" as SqlStdOperatorTable doesnt support "IS
NOT"
--
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]