Skip to content
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

[Bug] The "create_random_array" function does not respect input's timezone #6859

Open
niebayes opened this issue Dec 9, 2024 · 1 comment

Comments

@niebayes
Copy link
Contributor

niebayes commented Dec 9, 2024

If we instead input a field of the timestamp type having an associated timezone, the create_random_array function fails and produces the following error:

InvalidArgumentError("column types must match schema types, expected Timestamp(Second, Some(\"+00:00\")) but found Timestamp(Second, None)" at column index 120

See:

Timestamp(unit, _) => {
match unit {
TimeUnit::Second => Arc::new(create_random_temporal_array::<TimestampSecondType>(
size,
primitive_null_density,
)),
TimeUnit::Millisecond => Arc::new(create_random_temporal_array::<
TimestampMillisecondType,
>(size, primitive_null_density)),
TimeUnit::Microsecond => Arc::new(create_random_temporal_array::<
TimestampMicrosecondType,
>(size, primitive_null_density)),
TimeUnit::Nanosecond => Arc::new(create_random_temporal_array::<
TimestampNanosecondType,
>(size, primitive_null_density)),
}
}

@niebayes niebayes changed the title The "create_random_array" function does not respect input's timezone [Bug] The "create_random_array" function does not respect input's timezone Dec 9, 2024
@niebayes
Copy link
Contributor Author

niebayes commented Dec 9, 2024

I would like to file a PR for this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant