jiangtao69039 opened a new issue, #24637:
URL: https://github.com/apache/shardingsphere/issues/24637
#24532 Branches added to **BaseRule.g4/castFunction** may crash in a null
pointer. because **ctx.dataType()** my not exist.
```java
@Override
public final ASTNode visitCastFunction(final CastFunctionContext ctx) {
calculateParameterCount(ctx.expr());
FunctionSegment result = new
FunctionSegment(ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(),
ctx.CAST().getText(), getOriginalText(ctx));
for (ExprContext each : ctx.expr()) {
ASTNode expr = visit(each);
if (expr instanceof ColumnSegment) {
result.getParameters().add((ColumnSegment) expr);
} else if (expr instanceof LiteralExpressionSegment) {
result.getParameters().add((LiteralExpressionSegment) expr);
}
}
result.getParameters().add((DataTypeSegment) visit(ctx.dataType()));
return result;
}
```

--
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]