Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Removed custom allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Dec 20, 2021
1 parent f64339c commit e2471c9
Show file tree
Hide file tree
Showing 85 changed files with 684 additions and 1,950 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,6 @@ jobs:
# --skip io: miri can't handle opening of files, so we skip those
run: cargo miri test --features full -- --skip io::parquet --skip io::ipc

miri-checks-custom-allocator:
name: MIRI with custom allocator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-12-10
override: true
- uses: Swatinem/rust-cache@v1
with:
key: key1
- name: Install Miri
run: |
rustup component add miri
cargo miri setup
- name: Run
# --skip io: miri can't handle opening of files, so we skip those
run: cargo miri test --features full,cache_aligned -- --skip io::parquet --skip io::ipc

coverage:
name: Coverage
runs-on: ubuntu-latest
Expand All @@ -130,7 +109,6 @@ jobs:
run: cargo install cargo-tarpaulin
- name: Run coverage
run: |
cargo tarpaulin --features cache_aligned --ignore-tests --out Xml
cargo tarpaulin --features full --ignore-tests --out Xml
- name: Report coverage
continue-on-error: true
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,6 @@ compute = [
io_parquet = ["parquet2", "io_ipc", "base64", "futures"]
benchmarks = ["rand"]
simd = ["packed_simd"]
# uses a custom allocator whose pointers are aligned along cache lines.
# Using this features makes `Buffer` and `MutableBuffer` incompatible with `Vec`.
cache_aligned = []

[package.metadata.cargo-all-features]
allowlist = ["compute", "compute_sort", "compute_hash", "compute_nullif"]
Expand Down
119 changes: 0 additions & 119 deletions src/alloc/alignment.rs

This file was deleted.

128 changes: 0 additions & 128 deletions src/alloc/mod.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/array/binary/from.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<O: Offset> BinaryArray<O> {
impl<O: Offset, P: AsRef<[u8]>> FromIterator<Option<P>> for BinaryArray<O> {
#[inline]
fn from_iter<I: IntoIterator<Item = Option<P>>>(iter: I) -> Self {
MutableBinaryArray::from_iter(iter).into()
MutableBinaryArray::<O>::from_iter(iter).into()
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/array/binary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ pub struct BinaryArray<O: Offset> {
impl<O: Offset> BinaryArray<O> {
/// Creates an empty [`BinaryArray`], i.e. whose `.len` is zero.
pub fn new_empty(data_type: DataType) -> Self {
Self::from_data(data_type, Buffer::from(&[O::zero()]), Buffer::new(), None)
Self::from_data(
data_type,
Buffer::from(vec![O::zero()]),
Buffer::new(),
None,
)
}

/// Creates an null [`BinaryArray`], i.e. whose `.null_count() == .len()`.
Expand Down
Loading

0 comments on commit e2471c9

Please sign in to comment.