提交 c3deabaa authored 作者: Noel Grandin's avatar Noel Grandin

accidentally removed some error checking

上级 7ca15e40
...@@ -372,6 +372,9 @@ public class Aggregate extends Expression { ...@@ -372,6 +372,9 @@ public class Aggregate extends Expression {
DbException.throwInternalError("type=" + type); DbException.throwInternalError("type=" + type);
} }
} }
if (!select.isCurrentGroup()) {
throw DbException.get(ErrorCode.INVALID_USE_OF_AGGREGATE_FUNCTION_1, getSQL());
}
AggregateData data = (AggregateData)select.getCurrentGroupExprData(this); AggregateData data = (AggregateData)select.getCurrentGroupExprData(this);
if (data == null) { if (data == null) {
data = AggregateData.create(type); data = AggregateData.create(type);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论