Skip to content

Commit e45d2f9

Browse files
committed
wip datetimeparts fixes
Signed-off-by: Joe Isaacs <[email protected]>
1 parent a201670 commit e45d2f9

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

bench-vortex/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ tokio-stream = { workspace = true }
7373
tokio-util = { workspace = true }
7474
tpchgen = { workspace = true }
7575
tpchgen-arrow = { workspace = true }
76-
tracing = { workspace = true, features = ["max_level_trace"] }
76+
tracing = { workspace = true, features = ["max_level_debug"] }
7777
tracing-perfetto = { workspace = true }
7878
tracing-subscriber = { workspace = true, features = [
7979
"env-filter",

vortex-array/src/arrays/datetime/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ impl TemporalArray {
201201
}
202202
}
203203

204+
impl AsRef<dyn Array> for TemporalArray {
205+
fn as_ref(&self) -> &dyn Array {
206+
self.ext.as_ref()
207+
}
208+
}
209+
204210
impl From<TemporalArray> for ArrayRef {
205211
fn from(value: TemporalArray) -> Self {
206212
value.ext.into_array()

vortex-array/src/expr/transform/partition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ where
7171
Nullability::NonNullable,
7272
);
7373

74-
// let expr = expr.optimize_recursive(scope)?;
74+
let expr = expr.optimize_recursive(scope)?;
7575
let expr_dtype = expr.return_dtype(scope)?;
7676

7777
partitions.push(expr);

vortex-btrblocks/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,9 @@ impl BtrBlocksCompressor {
477477
if let Ok(temporal_array) = TemporalArray::try_from(ext_array.to_array())
478478
&& let TemporalMetadata::Timestamp(..) = temporal_array.temporal_metadata()
479479
{
480-
let temporal_array_ref = temporal_array.clone().into_array();
481-
if temporal_array_ref
482-
.as_ref()
483-
.is_constant_opts(Cost::Canonicalize)
484-
{
480+
if temporal_array.as_ref().is_constant_opts(Cost::Canonicalize) {
485481
return Ok(ConstantArray::new(
486-
temporal_array_ref.scalar_at(0),
482+
temporal_array.as_ref().scalar_at(0),
487483
ext_array.len(),
488484
)
489485
.into_array());

0 commit comments

Comments
 (0)