-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
38941: exec: fix a panic with sum_int aggregate with input types other than Int64 r=yuzefovich a=yuzefovich First commit wraps Next of materializer with a vectorized panic catcher. We used to catch panics only when calling Next() on the the input to materializer. However, it is also possible that types get messed up during planning a vectorized flow which can lead to a type conversion panic. We do not want to crash in such case either, so we wrap full Next() method with a catcher. Second commit falls back to DistSQL on sum_int if not on Int64. Currently, our aggregates expect that input and output types are the same. However, sum_int is planned such that flow consumer expects Int64 regardless of the input types. Supporting this would require adding specialized sum aggregates that would take in any int type and would output Int64. It is easier for now to just fallback to DistSQL on non-int64 input types. Fixes: #38937. Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
- Loading branch information
Showing
3 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters