Changeset: 24a0a5252e6c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/24a0a5252e6c
Modified Files:
monetdb5/modules/kernel/aggr.c
Branch: Dec2025
Log Message:
Improve error handling of bad quantile values.
diffs (32 lines):
diff --git a/monetdb5/modules/kernel/aggr.c b/monetdb5/modules/kernel/aggr.c
--- a/monetdb5/modules/kernel/aggr.c
+++ b/monetdb5/modules/kernel/aggr.c
@@ -72,20 +72,19 @@ AGGRgrouped_bat_or_val(bat *retval1, bat
MT_lock_set(&q->theaplock);
qvalue = ((const dbl *) Tloc(q, 0))[0];
MT_lock_unset(&q->theaplock);
- if (qvalue < 0 || qvalue > 1) {
- BBPunfix(b->batCacheid);
- BBPreclaim(g);
- BBPreclaim(e);
- BBPreclaim(s);
- BBPunfix(q->batCacheid);
- throw(MAL, malfunc,
- "quantile value of %f is not
in range [0,1]", qvalue);
- }
}
BBPunfix(q->batCacheid);
} else {
qvalue = *(quantile_val);
}
+ if (qvalue < 0 || qvalue > 1) {
+ BBPreclaim(b);
+ BBPreclaim(g);
+ BBPreclaim(e);
+ BBPreclaim(s);
+ throw(MAL, malfunc,
+ "quantile value of %f is not in range [0,1]",
qvalue);
+ }
bn = (*quantilefunc) (b, g, e, s, tp, qvalue, skip_nils);
} else if ((*grpfunc2) (&bn, retval2 ? &cnts : NULL, b, g, e, s, tp,
skip_nils, scale) !=
GDK_SUCCEED) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]