feat: Add Time/Interval/Decimal/Utf8View in aggregate fuzz testing#13226
feat: Add Time/Interval/Decimal/Utf8View in aggregate fuzz testing#13226alamb merged 6 commits intoapache:mainfrom
Time/Interval/Decimal/Utf8View in aggregate fuzz testing#13226Conversation
|
This PR looks great -- thank you @LeslieKid |
Time/Interval/Decimal in aggregate fuzz testingTime/Interval/Decimal/StringView in aggregate fuzz testing
Time/Interval/Decimal/StringView in aggregate fuzz testingTime/Interval/Decimal/Utf8View in aggregate fuzz testing
| let max_block_size = 2 * 1024 * 1024; | ||
| // Avoid block size equal to zero when calling `with_fixed_block_size()`. | ||
| if data_capacity == 0 { | ||
| return 1; |
There was a problem hiding this comment.
The data_capacity might be zero and results in aggregation fuzz tests panicked with message "Block size must be greater than 0".
So I modify this function to ensure that the block size would not be 0 in this case. But I'm not sure if this is a bug...
There was a problem hiding this comment.
I bet there is something / somewhere that is passing in an empty batch -- and a small optimization might be to avoid doing so.
Do you happen to have the stack trace still around?
alamb
left a comment
There was a problem hiding this comment.
Thank you @LeslieKid -- this is really nice
| use rand::Rng; | ||
|
|
||
| /// Randomly generate decimal arrays | ||
| pub struct DecimalArrayGenerator { |
| let max_block_size = 2 * 1024 * 1024; | ||
| // Avoid block size equal to zero when calling `with_fixed_block_size()`. | ||
| if data_capacity == 0 { | ||
| return 1; |
There was a problem hiding this comment.
I bet there is something / somewhere that is passing in an empty batch -- and a small optimization might be to avoid doing so.
Do you happen to have the stack trace still around?
| basic_random_data!(IntervalYearMonthType); | ||
| basic_random_data!(Decimal128Type); | ||
|
|
||
| impl RandomNativeData for Date64Type { |
|
Thanks again @LeslieKid |
Which issue does this PR close?
Part of #12114 .
Rationale for this change
Supporting more types for dataset generator in fuzzer framework is needed to improve aggregation fuzzer coverage.
What changes are included in this PR?
IntervalandTimetypes forPrimitiveArrayGenerator.DecimalArrayGeneratorto supportDecimaltype.Utf8Viewtype.Are these changes tested?
Are there any user-facing changes?