-
Notifications
You must be signed in to change notification settings - Fork 163
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] New DataType: Duration (without arithmetic) #1051
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1051 +/- ##
==========================================
+ Coverage 88.65% 88.66% +0.01%
==========================================
Files 54 54
Lines 5375 5382 +7
==========================================
+ Hits 4765 4772 +7
Misses 610 610
|
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 good to me!
src/array/ops/filter.rs
Outdated
let new_array = self.physical.filter(mask)?; | ||
Ok(Self::new(self.field.clone(), new_array)) | ||
} | ||
macro_rules! impl_logical_array_filter { |
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.
Since all of these are the same, what do you think of putting it into the logicalarray impl https://github.com/Eventual-Inc/Daft/blob/main/src/datatypes/logical.rs#L15
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.
oh, good idea
let new_array = self.physical.if_else(&other.physical, predicate)?; | ||
Ok(Self::new(self.field.clone(), new_array)) | ||
} | ||
macro_rules! impl_logicalarray_if_else { |
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.
Same thing as filter: thoughts on moving this to logicalarray impl: https://github.com/Eventual-Inc/Daft/blob/main/src/datatypes/logical.rs#L15
Adds support for an Arrow-like Duration datatype in Daft, parameterized by TimeUnit.
Includes: conversion to/from Arrow, Python; casting (using Arrow logical->logical casts); blackbox kernels.
Does not include temporal arithmetic, which requires refactoring the type system (next PR).
Drivebys
Converted various Array ops to macros.