Skip to content
Draft
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
82 changes: 41 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -291,56 +291,56 @@ package = "getrandom"
version = "0.3.1"

[workspace.lints.rust]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warn lets us enforce in CI and have a nicer time locally

let_underscore_drop = "deny"
macro_use_extern_crate = "deny"
redundant_lifetimes = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_lifetimes = "deny"
unused_qualifications = "deny"
unexpected_cfgs = { level = "deny", check-cfg = [
let_underscore_drop = "warn"
macro_use_extern_crate = "warn"
redundant_lifetimes = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(codspeed)",
"cfg(disable_loom)",
"cfg(vortex_nightly)",
] }
warnings = "warn"

[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
as_ptr_cast_mut = "deny"
borrow_as_ptr = "deny"
cargo = { level = "deny", priority = -1 }
cast_possible_truncation = "deny"
cognitive_complexity = "deny"
collection_is_never_read = "deny"
dbg_macro = "deny"
debug_assert_with_mut_call = "deny"
derive_partial_eq_without_eq = "deny"
equatable_if_let = "deny"
exit = "deny"
expect_fun_call = "deny"
expect_used = "deny"
fallible_impl_from = "deny"
get_unwrap = "deny"
host_endian_bytes = "deny"
if_then_some_else_none = "deny"
inconsistent_struct_constructor = "deny"
manual_assert = "deny"
manual_is_variant_and = "deny"
many_single_char_names = "deny"
mem_forget = "deny"
large_futures = "deny"
all = { level = "warn", priority = -1 }
as_ptr_cast_mut = "warn"
borrow_as_ptr = "warn"
cargo = { level = "warn", priority = -1 }
cast_possible_truncation = "warn"
cognitive_complexity = "warn"
collection_is_never_read = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
derive_partial_eq_without_eq = "warn"
equatable_if_let = "warn"
exit = "warn"
expect_fun_call = "warn"
expect_used = "warn"
fallible_impl_from = "warn"
get_unwrap = "warn"
host_endian_bytes = "warn"
if_then_some_else_none = "warn"
inconsistent_struct_constructor = "warn"
manual_assert = "warn"
manual_is_variant_and = "warn"
many_single_char_names = "warn"
mem_forget = "warn"
multiple_crate_versions = "allow"
needless_range_loop = "allow"
or_fun_call = "deny"
panic = "deny"
# panic_in_result_fn = "deny" -- we cannot disable this for tests to use assertions
redundant_clone = "deny"
same_name_method = "deny"
tests_outside_test_module = "deny"
# todo = "deny"
# unimplemented = "deny"
unwrap_in_result = "deny"
unwrap_used = "deny"
use_debug = "deny"
needless_pass_by_value = "warn"
or_fun_call = "warn"
panic = "warn"
redundant_clone = "warn"
same_name_method = "warn"
tests_outside_test_module = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
use_debug = "warn"
assigning_clones = "deny"

[profile.release]
codegen-units = 1
Expand Down
27 changes: 1 addition & 26 deletions benchmarks/compress-bench/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

use std::sync::Arc;

use ::vortex::array::arrays::ChunkedArray;
use ::vortex::array::arrays::recursive_list_from_list_view;
use arrow_array::RecordBatch;
use arrow_schema::Schema;
#[cfg(feature = "lance")]
pub use lance_bench::compress::LanceCompressor;

pub mod parquet;
pub mod vortex;

pub fn chunked_to_vec_record_batch(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dead code

chunked: ChunkedArray,
) -> anyhow::Result<(Vec<RecordBatch>, Arc<Schema>)> {
let chunks_vec = chunked.chunks();
assert!(!chunks_vec.is_empty(), "empty chunks");

let batches = chunks_vec
.iter()
.map(|array| {
// TODO(connor)[ListView]: The rust Parquet implementation does not support writing
// `ListView` to Parquet files yet.
let converted_array = recursive_list_from_list_view(array.clone())?;
Ok(RecordBatch::try_from(converted_array.as_ref())?)
})
.collect::<anyhow::Result<Vec<_>>>()?;

let schema = batches[0].schema();
Ok((batches, schema))
}
5 changes: 2 additions & 3 deletions benchmarks/compress-bench/src/vortex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

use std::io::Cursor;
use std::path::Path;
use std::sync::Arc;
use std::time::Duration;
use std::time::Instant;

Expand Down Expand Up @@ -58,9 +57,9 @@ impl Compressor for VortexCompressor {
let start = Instant::now();
let data = Bytes::from(buf);
let scan = SESSION.open_options().open_buffer(data)?.scan()?;
let schema = Arc::new(scan.dtype()?.to_arrow_schema()?);
let schema = scan.dtype()?.to_arrow_schema()?;

let stream = scan.into_record_batch_stream(schema)?;
let stream = scan.into_record_batch_stream(&schema)?;
pin_mut!(stream);

while let Some(batch) = stream.next().await {
Expand Down
7 changes: 4 additions & 3 deletions benchmarks/datafusion-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use datafusion_physical_plan::collect;
use futures::StreamExt;
use parking_lot::Mutex;
use tokio::fs::File;
use vortex::io::filesystem::FileSystemRef;
use vortex::scan::api::DataSourceRef;
use vortex_bench::Benchmark;
use vortex_bench::BenchmarkArg;
Expand Down Expand Up @@ -304,9 +305,9 @@ async fn register_v2_tables<B: Benchmark + ?Sized>(
.runtime_env()
.object_store(table_url.object_store())?;

let fs: vortex::io::filesystem::FileSystemRef =
Arc::new(ObjectStoreFileSystem::new(store.clone(), SESSION.handle()));
let base_prefix = benchmark_base.path().trim_start_matches('/').to_string();
let fs =
Arc::new(ObjectStoreFileSystem::new(store.clone(), SESSION.handle())) as FileSystemRef;
let base_prefix = benchmark_base.path().trim_start_matches('/');
let fs = fs.with_prefix(base_prefix);

let glob_pattern = match &pattern {
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/duckdb-bench/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::needless_pass_by_value)]

//! DuckDB context for benchmarks.

use std::ops::Deref;
Expand Down
2 changes: 0 additions & 2 deletions benchmarks/duckdb-bench/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

mod validation;

use std::path::PathBuf;

use clap::Parser;
Expand Down
110 changes: 0 additions & 110 deletions benchmarks/duckdb-bench/src/validation.rs

This file was deleted.

2 changes: 2 additions & 0 deletions benchmarks/lance-bench/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::needless_pass_by_value)]

pub mod compress;
pub mod convert;
pub mod random_access;
2 changes: 1 addition & 1 deletion encodings/alp/public-api.lock
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,6 @@ pub fn f64::to_u16(bits: Self::UINT) -> u16

pub fn vortex_alp::alp_encode(parray: &vortex_array::arrays::primitive::array::PrimitiveArray, exponents: core::option::Option<vortex_alp::Exponents>) -> vortex_error::VortexResult<vortex_alp::ALPArray>

pub fn vortex_alp::alp_rd_decode<T: vortex_alp::ALPRDFloat>(left_parts: vortex_buffer::buffer::Buffer<u16>, left_parts_dict: &[u16], right_bit_width: u8, right_parts: vortex_buffer::buffer_mut::BufferMut<<T as vortex_alp::ALPRDFloat>::UINT>, left_parts_patches: core::option::Option<&vortex_array::patches::Patches>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_buffer::buffer::Buffer<T>>
pub fn vortex_alp::alp_rd_decode<T: vortex_alp::ALPRDFloat>(left_parts: &[u16], left_parts_dict: &[u16], right_bit_width: u8, right_parts: vortex_buffer::buffer_mut::BufferMut<<T as vortex_alp::ALPRDFloat>::UINT>, left_parts_patches: core::option::Option<&vortex_array::patches::Patches>, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_buffer::buffer::Buffer<T>>

pub fn vortex_alp::decompress_into_array(array: vortex_alp::ALPArray, ctx: &mut vortex_array::executor::ExecutionCtx) -> vortex_error::VortexResult<vortex_array::arrays::primitive::array::PrimitiveArray>
2 changes: 1 addition & 1 deletion encodings/alp/src/alp/compute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ mod tests {
#[case::f32_large(alp_encode(&PrimitiveArray::from_iter((0..100).map(|i| i as f32 * 1.5)), None).unwrap())]
#[case::f64_large(alp_encode(&PrimitiveArray::from_iter((0..100).map(|i| i as f64 * 2.5)), None).unwrap())]
fn test_alp_binary_numeric(#[case] array: ALPArray) {
test_binary_numeric_array(array.into_array());
test_binary_numeric_array(&array.into_array());
}
}
Loading
Loading