Skip to content

Commit a3f290c

Browse files
authored
remove deprecated StructStrategy (#7242)
## Summary The `StructStrategy` has been deprecated since 0.59.0, and `TableStrategy` has been the default writer strategy for tabular things since then as well. ## API Changes For anyone still using StructStrategy, you can migrate to TableStrategy by changing ```rust let writer = StructStrategy::new(child_strategy, validity_strategy); ``` To ```rust let writer = TableStrategy::new(Arc::new(validity_strategy), Arc::new(child_strategy)); ``` **Note that TableStrategy and StructStrategy constructors have their arguments flipped** ## Testing We're eliminating code, nothing added. Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 8060ae0 commit a3f290c

4 files changed

Lines changed: 3 additions & 327 deletions

File tree

vortex-layout/public-api.lock

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -642,24 +642,6 @@ pub fn vortex_layout::layouts::row_idx::row_idx() -> vortex_array::expr::express
642642

643643
pub mod vortex_layout::layouts::struct_
644644

645-
pub mod vortex_layout::layouts::struct_::writer
646-
647-
pub struct vortex_layout::layouts::struct_::writer::StructStrategy
648-
649-
impl vortex_layout::layouts::struct_::writer::StructStrategy
650-
651-
pub fn vortex_layout::layouts::struct_::writer::StructStrategy::new<S: vortex_layout::LayoutStrategy, V: vortex_layout::LayoutStrategy>(child: S, validity: V) -> Self
652-
653-
impl core::clone::Clone for vortex_layout::layouts::struct_::writer::StructStrategy
654-
655-
pub fn vortex_layout::layouts::struct_::writer::StructStrategy::clone(&self) -> vortex_layout::layouts::struct_::writer::StructStrategy
656-
657-
impl vortex_layout::LayoutStrategy for vortex_layout::layouts::struct_::writer::StructStrategy
658-
659-
pub fn vortex_layout::layouts::struct_::writer::StructStrategy::buffered_bytes(&self) -> u64
660-
661-
pub fn vortex_layout::layouts::struct_::writer::StructStrategy::write_stream<'life0, 'async_trait>(&'life0 self, ctx: vortex_array::ArrayContext, segment_sink: vortex_layout::segments::SegmentSinkRef, stream: vortex_layout::sequence::SendableSequentialStream, eof: vortex_layout::sequence::SequencePointer, handle: vortex_io::runtime::handle::Handle) -> core::pin::Pin<alloc::boxed::Box<(dyn core::future::future::Future<Output = vortex_error::VortexResult<vortex_layout::LayoutRef>> + core::marker::Send + 'async_trait)>> where Self: 'async_trait, 'life0: 'async_trait
662-
663645
pub struct vortex_layout::layouts::struct_::Struct
664646

665647
impl core::fmt::Debug for vortex_layout::layouts::struct_::Struct
@@ -1938,12 +1920,6 @@ pub fn vortex_layout::layouts::repartition::RepartitionStrategy::buffered_bytes(
19381920

19391921
pub fn vortex_layout::layouts::repartition::RepartitionStrategy::write_stream<'life0, 'async_trait>(&'life0 self, ctx: vortex_array::ArrayContext, segment_sink: vortex_layout::segments::SegmentSinkRef, stream: vortex_layout::sequence::SendableSequentialStream, eof: vortex_layout::sequence::SequencePointer, handle: vortex_io::runtime::handle::Handle) -> core::pin::Pin<alloc::boxed::Box<(dyn core::future::future::Future<Output = vortex_error::VortexResult<vortex_layout::LayoutRef>> + core::marker::Send + 'async_trait)>> where Self: 'async_trait, 'life0: 'async_trait
19401922

1941-
impl vortex_layout::LayoutStrategy for vortex_layout::layouts::struct_::writer::StructStrategy
1942-
1943-
pub fn vortex_layout::layouts::struct_::writer::StructStrategy::buffered_bytes(&self) -> u64
1944-
1945-
pub fn vortex_layout::layouts::struct_::writer::StructStrategy::write_stream<'life0, 'async_trait>(&'life0 self, ctx: vortex_array::ArrayContext, segment_sink: vortex_layout::segments::SegmentSinkRef, stream: vortex_layout::sequence::SendableSequentialStream, eof: vortex_layout::sequence::SequencePointer, handle: vortex_io::runtime::handle::Handle) -> core::pin::Pin<alloc::boxed::Box<(dyn core::future::future::Future<Output = vortex_error::VortexResult<vortex_layout::LayoutRef>> + core::marker::Send + 'async_trait)>> where Self: 'async_trait, 'life0: 'async_trait
1946-
19471923
impl vortex_layout::LayoutStrategy for vortex_layout::layouts::table::TableStrategy
19481924

19491925
pub fn vortex_layout::layouts::table::TableStrategy::buffered_bytes(&self) -> u64

vortex-layout/src/layouts/struct_/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
mod reader;
5-
pub mod writer;
65

76
use std::sync::Arc;
87

vortex-layout/src/layouts/struct_/writer.rs

Lines changed: 0 additions & 300 deletions
This file was deleted.

vortex-layout/src/layouts/table.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
//! A more configurable variant of the `StructStrategy` that allows overwriting
5-
//! specific leaf fields with custom write strategies.
4+
//! A configurable writer strategy for tabular data.
5+
//!
6+
//! Allows the caller to override specific leaf fields with custom layout strategies.
67
78
use std::sync::Arc;
89

0 commit comments

Comments
 (0)