Skip to content

Commit 5d72d84

Browse files
authored
chore: replace vortex-serde with 3 crates (#1296)
Broke vortex-serde out to avoid confusion with the `serde` public crate. There are now 3 crates: 1. `vortex-io`: Contains core IO traits like `VortexReadAt` and `VortexWrite` as well as impls, with feature flags for `compio`, `tokio`, `object_store` 2. `vortex-ipc` containing the IPC messages and stream_readers/stream_writers 3. `vortex-file` which imports the other two crates and contains all of the layout and file related types, with feature flags for `tokio`, `compio`, etc. `vortex` top-level crate re-exports these as `vortex::io`, `vortex::ipc` and `vortex::file` respectively
1 parent ff85bd8 commit 5d72d84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+520
-382
lines changed

Cargo.lock

Lines changed: 80 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ members = [
1212
"vortex-dtype",
1313
"vortex-error",
1414
"vortex-expr",
15+
"vortex-file",
1516
"vortex-flatbuffers",
17+
"vortex-io",
18+
"vortex-ipc",
1619
"vortex-proto",
1720
"vortex-sampling-compressor",
1821
"vortex-scalar",
1922
"vortex-schema",
20-
"vortex-serde",
2123
"xtask",
2224
]
2325
resolver = "2"
@@ -149,15 +151,17 @@ vortex-dtype = { version = "0.16.0", path = "./vortex-dtype", default-features =
149151
vortex-error = { version = "0.16.0", path = "./vortex-error" }
150152
vortex-expr = { version = "0.16.0", path = "./vortex-expr" }
151153
vortex-fastlanes = { version = "0.16.0", path = "./encodings/fastlanes" }
154+
vortex-file = { version = "0.16.0", path = "./vortex-file", default-features = false }
152155
vortex-flatbuffers = { version = "0.16.0", path = "./vortex-flatbuffers" }
153156
vortex-fsst = { version = "0.16.0", path = "./encodings/fsst" }
157+
vortex-io = { version = "0.16.0", path = "./vortex-io" }
158+
vortex-ipc = { version = "0.16.0", path = "./vortex-ipc" }
154159
vortex-proto = { version = "0.16.0", path = "./vortex-proto" }
155160
vortex-roaring = { version = "0.16.0", path = "./encodings/roaring" }
156161
vortex-runend = { version = "0.16.0", path = "./encodings/runend" }
157162
vortex-runend-bool = { version = "0.16.0", path = "./encodings/runend-bool" }
158163
vortex-scalar = { version = "0.16.0", path = "./vortex-scalar", default-features = false }
159164
vortex-schema = { version = "0.16.0", path = "./vortex-schema" }
160-
vortex-serde = { version = "0.16.0", path = "./vortex-serde", default-features = false }
161165
vortex-sampling-compressor = { version = "0.16.0", path = "./vortex-sampling-compressor" }
162166
vortex-zigzag = { version = "0.16.0", path = "./encodings/zigzag" }
163167
# END crates published by this project

bench-vortex/benches/bytes_at.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use futures::StreamExt;
1010
use vortex::array::{PrimitiveArray, VarBinArray, VarBinViewArray};
1111
use vortex::buffer::Buffer;
1212
use vortex::dtype::{DType, Nullability};
13-
use vortex::serde::stream_reader::StreamArrayReader;
14-
use vortex::serde::stream_writer::StreamArrayWriter;
13+
use vortex::ipc::stream_reader::StreamArrayReader;
14+
use vortex::ipc::stream_writer::StreamArrayWriter;
1515
use vortex::validity::Validity;
1616
use vortex::{Context, IntoArray, IntoCanonical};
1717

bench-vortex/benches/compress_noci.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use vortex::array::{ChunkedArray, StructArray};
2626
use vortex::buffer::Buffer;
2727
use vortex::dtype::field::Field;
2828
use vortex::error::VortexResult;
29+
use vortex::file::{LayoutContext, LayoutDeserializer, VortexFileWriter, VortexReadBuilder};
2930
use vortex::sampling_compressor::compressors::fsst::FSSTCompressor;
3031
use vortex::sampling_compressor::{SamplingCompressor, ALL_ENCODINGS_CONTEXT};
31-
use vortex::serde::file::{LayoutContext, LayoutDeserializer, VortexFileWriter, VortexReadBuilder};
3232
use vortex::{Array, ArrayDType, IntoArray, IntoCanonical};
3333

3434
use crate::tokio_runtime::TOKIO_RUNTIME;

bench-vortex/src/data_downloads.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use vortex::array::ChunkedArray;
1313
use vortex::arrow::FromArrowType;
1414
use vortex::dtype::DType;
1515
use vortex::error::{VortexError, VortexResult};
16-
use vortex::serde::io::TokioAdapter;
17-
use vortex::serde::stream_writer::StreamArrayWriter;
16+
use vortex::io::TokioAdapter;
17+
use vortex::ipc::stream_writer::StreamArrayWriter;
1818
use vortex::{Array, IntoArray};
1919

2020
use crate::idempotent;

bench-vortex/src/reader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ use vortex::arrow::FromArrowType;
2727
use vortex::compress::CompressionStrategy;
2828
use vortex::dtype::DType;
2929
use vortex::error::VortexResult;
30+
use vortex::file::{LayoutContext, LayoutDeserializer, VortexFileWriter, VortexReadBuilder};
31+
use vortex::io::{ObjectStoreReadAt, TokioFile, VortexReadAt, VortexWrite};
3032
use vortex::sampling_compressor::{SamplingCompressor, ALL_ENCODINGS_CONTEXT};
31-
use vortex::serde::file::{LayoutContext, LayoutDeserializer, VortexFileWriter, VortexReadBuilder};
32-
use vortex::serde::io::{ObjectStoreReadAt, TokioFile, VortexReadAt, VortexWrite};
3333
use vortex::{Array, IntoArray, IntoCanonical};
3434

3535
pub const BATCH_SIZE: usize = 65_536;

bench-vortex/src/taxi_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::path::PathBuf;
55
use futures::executor::block_on;
66
use vortex::buffer::io_buf::IoBuf;
77
use vortex::error::VortexError;
8-
use vortex::serde::io::VortexWrite;
8+
use vortex::io::VortexWrite;
99

1010
use crate::data_downloads::{data_vortex_uncompressed, download_data};
1111
use crate::reader::rewrite_parquet_as_vortex;

bench-vortex/src/tpch/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use vortex::aliases::hash_map::HashMap;
1515
use vortex::array::{ChunkedArray, StructArray};
1616
use vortex::arrow::FromArrowArray;
1717
use vortex::dtype::DType;
18+
use vortex::file::{VortexFileWriter, VORTEX_FILE_EXTENSION};
1819
use vortex::sampling_compressor::SamplingCompressor;
19-
use vortex::serde::file::{VortexFileWriter, VORTEX_FILE_EXTENSION};
2020
use vortex::variants::StructArrayTrait;
2121
use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant};
2222
use vortex_datafusion::memory::VortexMemTableOptions;

pyvortex/src/dataset.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ use vortex::arrow::infer_schema;
1010
use vortex::dtype::field::Field;
1111
use vortex::dtype::DType;
1212
use vortex::error::{vortex_err, VortexResult};
13-
use vortex::sampling_compressor::ALL_ENCODINGS_CONTEXT;
14-
use vortex::serde::file::{
13+
use vortex::file::{
1514
read_initial_bytes, LayoutContext, LayoutDeserializer, Projection, RowFilter,
1615
VortexFileArrayStream, VortexReadBuilder, VortexRecordBatchReader,
1716
};
18-
use vortex::serde::io::{ObjectStoreReadAt, TokioFile, VortexReadAt};
17+
use vortex::io::{ObjectStoreReadAt, TokioFile, VortexReadAt};
18+
use vortex::sampling_compressor::ALL_ENCODINGS_CONTEXT;
1919
use vortex::Array;
2020

2121
use crate::expr::PyExpr;

pyvortex/src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use pyo3::prelude::*;
44
use pyo3::pyfunction;
55
use pyo3::types::PyString;
66
use tokio::fs::File;
7+
use vortex::file::VortexFileWriter;
78
use vortex::sampling_compressor::SamplingCompressor;
8-
use vortex::serde::file::VortexFileWriter;
99
use vortex::Array;
1010

1111
use crate::dataset::{ObjectStoreUrlDataset, TokioFileDataset};

0 commit comments

Comments
 (0)