fix: 修复数据集执行sql报错

This commit is contained in:
taojinlong 2025-01-15 17:35:16 +08:00 committed by taojinlong
parent 078b71577a
commit 153d2657f6

View File

@ -570,9 +570,12 @@ public class SqlparserUtils {
getBuffer().append(" " + operator + " "); getBuffer().append(" " + operator + " ");
hasSubBinaryExpression = false; hasSubBinaryExpression = false;
if (expr.getRightExpression() instanceof Parenthesis) { if (expr.getRightExpression() instanceof Parenthesis) {
try {
Parenthesis parenthesis = (Parenthesis) expr.getRightExpression(); Parenthesis parenthesis = (Parenthesis) expr.getRightExpression();
BinaryExpression rightBinaryExpression = (BinaryExpression) parenthesis.getExpression(); BinaryExpression rightBinaryExpression = (BinaryExpression) parenthesis.getExpression();
hasSubBinaryExpression = rightBinaryExpression instanceof AndExpression || rightBinaryExpression instanceof OrExpression; hasSubBinaryExpression = rightBinaryExpression instanceof AndExpression || rightBinaryExpression instanceof OrExpression;
} catch (Exception e) {
}
} }
if (expr.getRightExpression() instanceof BinaryExpression) { if (expr.getRightExpression() instanceof BinaryExpression) {
try { try {