Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Sep 2, 2024
1 parent ef67f90 commit b52b396
Show file tree
Hide file tree
Showing 104 changed files with 461 additions and 672 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ hex = "0.4.3"
indexmap = { version = "2", features = ["std"] }
itoa = "1.0.6"
itoap = { version = "1", features = ["simd"] }
libc = "0.2"
kstring = { version = "2.0.2", features = ["arc", "max_inline", "serde"] }
libc = "0.2"
memchr = "2.6"
memmap = { package = "memmap2", version = "0.7" }
multiversion = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/ffi/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl ArrowSchema {
{
flags += *is_ordered as i64;
// we do not store field info in the dict values, so can't recover it all :(
let field = Field::new(PlSmallStr::const_default(), values.as_ref().clone(), true);
let field = Field::new(PlSmallStr::EMPTY, values.as_ref().clone(), true);
Some(Box::new(ArrowSchema::new(&field)))
} else {
None
Expand Down
6 changes: 1 addition & 5 deletions crates/polars-arrow/src/io/ipc/read/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,7 @@ pub fn read_dictionary<R: Read + Seek>(
};

// Make a fake schema for the dictionary batch.
let fields = vec![Field::new(
PlSmallStr::const_default(),
value_type.clone(),
false,
)];
let fields = vec![Field::new(PlSmallStr::EMPTY, value_type.clone(), false)];
let ipc_schema = IpcSchema {
fields: vec![first_ipc_field.clone()],
is_little_endian: ipc_schema.is_little_endian,
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-arrow/src/mmap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ unsafe fn mmap_dictionary<T: AsRef<[u8]>>(
};

// Make a fake schema for the dictionary batch.
let field = Field::new(PlSmallStr::const_default(), value_type.clone(), false);
let field = Field::new(PlSmallStr::EMPTY, value_type.clone(), false);

let chunk = _mmap_record(
&[field],
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-core/src/chunked_array/array/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl ArrayChunked {
/// The lifetime of [AmortSeries] is bound to the iterator. Keeping it alive
/// longer than the iterator is UB.
pub fn amortized_iter(&self) -> AmortizedListIter<impl Iterator<Item = Option<ArrayBox>> + '_> {
self.amortized_iter_with_name(PlSmallStr::const_default())
self.amortized_iter_with_name(PlSmallStr::EMPTY)
}

/// This is an iterator over a [`ArrayChunked`] that save allocations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct AnonymousListBuilder<'a> {

impl Default for AnonymousListBuilder<'_> {
fn default() -> Self {
Self::new(PlSmallStr::const_default(), 0, None)
Self::new(PlSmallStr::EMPTY, 0, None)
}
}

Expand Down Expand Up @@ -91,7 +91,7 @@ impl<'a> AnonymousListBuilder<'a> {
Some(dt) => DataType::List(Box::new(dt)),
};

let mut ca = ListChunked::with_chunk(PlSmallStr::const_default(), arr);
let mut ca = ListChunked::with_chunk(PlSmallStr::EMPTY, arr);
if slf.fast_explode {
ca.set_fast_explode();
}
Expand All @@ -111,7 +111,7 @@ pub struct AnonymousOwnedListBuilder {

impl Default for AnonymousOwnedListBuilder {
fn default() -> Self {
Self::new(PlSmallStr::const_default(), 0, None)
Self::new(PlSmallStr::EMPTY, 0, None)
}
}

Expand Down Expand Up @@ -151,7 +151,7 @@ impl ListBuilderTrait for AnonymousOwnedListBuilder {
Some(dt) => DataType::List(Box::new(dt)),
};

let mut ca = ListChunked::with_chunk(PlSmallStr::const_default(), arr);
let mut ca = ListChunked::with_chunk(PlSmallStr::EMPTY, arr);
if slf.fast_explode {
ca.set_fast_explode();
}
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-core/src/chunked_array/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ where
let chunks = iter
.into_iter()
.map(|(values, opt_buffer)| to_primitive::<T>(values, opt_buffer));
ChunkedArray::from_chunk_iter(PlSmallStr::const_default(), chunks)
ChunkedArray::from_chunk_iter(PlSmallStr::EMPTY, chunks)
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/polars-core/src/chunked_array/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ fn cast_list(
// SAFETY: inner dtype is passed correctly
let s = unsafe {
Series::from_chunks_and_dtype_unchecked(
PlSmallStr::const_default(),
PlSmallStr::EMPTY,
vec![arr.values().clone()],
ca.inner_dtype(),
)
Expand Down Expand Up @@ -646,7 +646,7 @@ unsafe fn cast_list_unchecked(ca: &ListChunked, child_type: &DataType) -> Polars
// SAFETY: inner dtype is passed correctly
let s = unsafe {
Series::from_chunks_and_dtype_unchecked(
PlSmallStr::const_default(),
PlSmallStr::EMPTY,
vec![arr.values().clone()],
ca.inner_dtype(),
)
Expand Down Expand Up @@ -682,7 +682,7 @@ fn cast_fixed_size_list(
// SAFETY: inner dtype is passed correctly
let s = unsafe {
Series::from_chunks_and_dtype_unchecked(
PlSmallStr::const_default(),
PlSmallStr::EMPTY,
vec![arr.values().clone()],
ca.inner_dtype(),
)
Expand Down
Loading

0 comments on commit b52b396

Please sign in to comment.