mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.sql.ast.*;
|
||||
import com.alibaba.druid.sql.ast.expr.*;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLNotNullConstraint;
|
||||
@@ -822,8 +823,10 @@ public class SQLExprParser extends SQLParser {
|
||||
methodInvokeExpr = new SQLMethodInvokeExpr(methodName);
|
||||
}
|
||||
|
||||
if (isAggreateFunction(methodName)) {
|
||||
SQLAggregateExpr aggregateExpr = parseAggregateExpr(methodName);
|
||||
String aggMethodName = SQLUtils.normalize(methodName);
|
||||
|
||||
if (isAggreateFunction(aggMethodName)) {
|
||||
SQLAggregateExpr aggregateExpr = parseAggregateExpr(aggMethodName);
|
||||
if (distinct) {
|
||||
aggregateExpr.setOption(SQLAggregateOption.DISTINCT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user