-
Notifications
You must be signed in to change notification settings - Fork 976
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
wip: Implement extract epoch #2786
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2786 +/- ##
==========================================
- Coverage 85.15% 85.11% -0.04%
==========================================
Files 273 273
Lines 48076 48096 +20
==========================================
Hits 40938 40938
- Misses 7138 7158 +20
Continue to review full report at Codecov.
|
_ => Err(DataFusionError::Execution(format!( | ||
"Date part '{}' not supported", | ||
"Date partx '{}' not supported", |
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.
"Date partx '{}' not supported", | |
"Date part '{}' not supported", |
if array.is_null(i) { | ||
b.append_null()?; | ||
} else { | ||
let scale = match unit { |
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.
I would recommend using the chrono
functions for this, such as done here:
T: ArrowTemporalType + ArrowNumericType, | ||
i64: std::convert::From<T::Native>, | ||
{ | ||
let mut b = Int32Builder::new(array.len()); |
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.
Note: In terms of performance (and readability), it is better to avoid the builder/value
etc. and work directly on the values (check the arrow-rs kernels for examples).
Ok to leave this for a future PR if you like 👍
This PR is more than 6 month old, so closing it down for now to clean up the PR list. Please reopen if this is a mistake and you plan to work on it more |
Which issue does this PR close?
Closes #2785
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?