return fast on error

This commit is contained in:
chrislu
2025-09-02 14:09:38 -07:00
parent 1a2225c0f5
commit 586a795b02
3 changed files with 149 additions and 9 deletions

View File

@@ -442,7 +442,10 @@ func (e *SQLEngine) executeSelectStatementWithPlan(ctx context.Context, stmt *sq
switch col := expr.Expr.(type) {
case *sqlparser.FuncExpr:
// This is an aggregation function
aggSpec, _ := e.parseAggregationFunction(col, expr)
aggSpec, err := e.parseAggregationFunction(col, expr)
if err != nil {
return &QueryResult{Error: err}, err
}
if aggSpec != nil {
aggregations = append(aggregations, *aggSpec)
hasAggregations = true