feat: Add random timezone to aggregate fuzz test#13349
Merged
alamb merged 3 commits intoapache:mainfrom Nov 13, 2024
Merged
Conversation
LeslieKid
reviewed
Nov 12, 2024
Contributor
There was a problem hiding this comment.
👍This PR is great.
The only thing i am concerned is -- the timestamp part in baseline_config() function in aggr_fuzz.rs is:
ColumnDescr::new("timestamp_s", DataType::Timestamp(TimeUnit::Second, None)),
ColumnDescr::new(
"timestamp_ms",
DataType::Timestamp(TimeUnit::Millisecond, None),
),
ColumnDescr::new(
"timestamp_us",
DataType::Timestamp(TimeUnit::Microsecond, None),
),
ColumnDescr::new(
"timestamp_ns",
DataType::Timestamp(TimeUnit::Nanosecond, None),
),The implementation will generate the timezone randomly. So I think the None here may confuse the reader. Maybe we can add some comments here, or use generate_timezone() function to replace the None directly to make the code clear?
Contributor
Author
|
@LeslieKid Yeah I can definitely add a comment, as using generate_timezone() directly in the function makes it difficult to pass into the |
alamb
approved these changes
Nov 13, 2024
Contributor
alamb
left a comment
There was a problem hiding this comment.
Looks great to me -- thank you @jonathanc-n and @LeslieKid
| ColumnDescr::new("time32_ms", DataType::Time32(TimeUnit::Millisecond)), | ||
| ColumnDescr::new("time64_us", DataType::Time64(TimeUnit::Microsecond)), | ||
| ColumnDescr::new("time64_ns", DataType::Time64(TimeUnit::Nanosecond)), | ||
| // `None` is passed in here however when generating the array, it will generate |
| use arrow::datatypes::DataType; | ||
| use rand::rngs::StdRng; | ||
| use rand::Rng; | ||
| use chrono_tz::{Tz, TZ_VARIANTS}; |
Contributor
There was a problem hiding this comment.
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #13302 .
Rationale for this change
What changes are included in this PR?
Added random timezones to fuzz test for timestamps