We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 215b7d4 commit 9558efaCopy full SHA for 9558efa
src/expr/src/relation/func.rs
@@ -3943,6 +3943,14 @@ impl TableFunc {
3943
// We error if the count is not one,
3944
// and produce no rows if equal to one.
3945
let count = datums[0].unwrap_int64();
3946
+ // Note that we can't get a 0 count here, since the `Reduce count` below us is not
3947
+ // an SQL `count`, but an MIR `count`, which has an empty output on an empty input.
3948
+ // If we get a negative count, then we have a negative accumulation error somewhere.
3949
+ soft_assert_or_log!(
3950
+ count >= 1,
3951
+ "GuardSubquerySize encountered invalid count: {}",
3952
+ count
3953
+ );
3954
if count != 1 {
3955
Err(EvalError::MultipleRowsFromSubquery)
3956
} else {
0 commit comments