-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add random timezone to aggregate fuzz test #13349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍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?
@LeslieKid Yeah I can definitely add a comment, as using generate_timezone() directly in the function makes it difficult to pass into the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me -- thank you @jonathanc-n and @LeslieKid
@@ -172,6 +172,8 @@ fn baseline_config() -> DatasetGeneratorConfig { | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -17,8 +17,9 @@ | |||
|
|||
use arrow::array::{ArrayRef, ArrowPrimitiveType, PrimitiveArray, UInt32Array}; | |||
use arrow::datatypes::DataType; | |||
use rand::rngs::StdRng; | |||
use rand::Rng; | |||
use chrono_tz::{Tz, TZ_VARIANTS}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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