Merge pull request #9144 from dataease/pr@v1.18@fix_dataset-merge

fix(数据集): 数据集动态参数使用 BETWEEN 报错
This commit is contained in:
王嘉豪 2024-04-16 19:05:58 +08:00 committed by GitHub
commit b614e50551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2829,9 +2829,11 @@ public class DataSetTableService {
private void visitBinaryExpr(BinaryExpression expr, String operator) {
boolean hasSubBinaryExpression = false;
if(expr.getLeftExpression() instanceof Parenthesis){
Parenthesis parenthesis = (Parenthesis)expr.getLeftExpression();
BinaryExpression leftBinaryExpression = (BinaryExpression)parenthesis.getExpression();
hasSubBinaryExpression = leftBinaryExpression instanceof AndExpression || leftBinaryExpression instanceof OrExpression;
try {
Parenthesis parenthesis = (Parenthesis)expr.getLeftExpression();
BinaryExpression leftBinaryExpression = (BinaryExpression)parenthesis.getExpression();
hasSubBinaryExpression = leftBinaryExpression instanceof AndExpression || leftBinaryExpression instanceof OrExpression;
}catch (Exception e){}
}
if(expr.getLeftExpression() instanceof BinaryExpression){
try {