Skip to content
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

Split vortex-schema from main crate #124

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 50 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ members = [
"bench-vortex",
"fastlanez-sys",
"pyvortex",
"vortex-array",
"vortex-alloc",
"vortex-alp",
"vortex-array",
"vortex-dict",
"vortex-fastlanes",
"vortex-ree",
"vortex-roaring",
"vortex-schema",
"vortex-zigzag",
]
resolver = "2"
Expand Down
3 changes: 2 additions & 1 deletion bench-vortex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ workspace = true

[dependencies]
arrow-array = "50.0.0"
vortex-array = { path = "../vortex-array" }
vortex-alp = { path = "../vortex-alp" }
vortex-array = { path = "../vortex-array" }
vortex-dict = { path = "../vortex-dict" }
vortex-fastlanes = { path = "../vortex-fastlanes" }
vortex-ree = { path = "../vortex-ree" }
vortex-roaring = { path = "../vortex-roaring" }
vortex-schema = { path = "../vortex-schema" }
vortex-zigzag = { path = "../vortex-zigzag" }
itertools = "0.12.1"
reqwest = { version = "0.11.24", features = ["blocking"] }
Expand Down
28 changes: 16 additions & 12 deletions bench-vortex/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
use std::collections::HashSet;
use std::fs::{create_dir_all, File};
use std::path::{Path, PathBuf};
use std::sync::Arc;

use arrow_array::RecordBatchReader;
use itertools::Itertools;
use log::info;
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
use parquet::arrow::ProjectionMask;
use std::collections::HashSet;
use std::fs::{create_dir_all, File};
use std::path::{Path, PathBuf};
use std::sync::Arc;

use vortex::array::bool::BoolEncoding;
use vortex::array::chunked::{ChunkedArray, ChunkedEncoding};
use vortex::array::constant::ConstantEncoding;

use vortex::array::composite::CompositeEncoding;
use vortex::array::constant::ConstantEncoding;
use vortex::array::downcast::DowncastArrayBuiltin;
use vortex::array::primitive::PrimitiveEncoding;
use vortex::array::sparse::SparseEncoding;
use vortex::array::struct_::StructEncoding;
use vortex::array::varbin::VarBinEncoding;
use vortex::array::varbinview::VarBinViewEncoding;
use vortex::array::{Array, ArrayRef, Encoding};
use vortex::arrow::FromArrowType;
use vortex::compress::{CompressConfig, CompressCtx};
use vortex::dtype::DType;
use vortex::formatter::display_tree;
use vortex_alp::ALPEncoding;
use vortex_dict::DictEncoding;
use vortex_fastlanes::{BitPackedEncoding, FoREncoding};
use vortex_ree::REEEncoding;
use vortex_roaring::RoaringBoolEncoding;
use vortex_schema::DType;

pub fn enumerate_arrays() -> Vec<&'static dyn Encoding> {
vec![
Expand Down Expand Up @@ -116,7 +118,7 @@ pub fn compress_taxi_data() -> ArrayRef {
})
.collect_vec();

let dtype: DType = schema.clone().try_into().unwrap();
let dtype = DType::from_arrow(schema.clone());
let compressed = ChunkedArray::new(chunks.clone(), dtype).boxed();

info!("Compressed array {}", display_tree(compressed.as_ref()));
Expand All @@ -142,16 +144,18 @@ pub fn compress_taxi_data() -> ArrayRef {

#[cfg(test)]
mod test {
use std::fs::File;
use std::ops::Deref;
use std::sync::Arc;

use arrow_array::{ArrayRef as ArrowArrayRef, StructArray as ArrowStructArray};
use log::LevelFilter;
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
use simplelog::{ColorChoice, Config, TermLogger, TerminalMode};
use std::fs::File;
use std::ops::Deref;
use std::sync::Arc;

use vortex::array::ArrayRef;
use vortex::compute::as_arrow::as_arrow;
use vortex::encode::FromArrow;
use vortex::encode::FromArrowArray;
use vortex::serde::{ReadCtx, WriteCtx};

use crate::{compress_ctx, compress_taxi_data, download_taxi_data};
Expand Down
Loading