Skip to content

Commit

Permalink
rust polars 0.39.1 (#15676)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Apr 15, 2024
1 parent 3d100a8 commit 5e68541
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 47 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

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

36 changes: 18 additions & 18 deletions Cargo.toml
Expand Up @@ -14,7 +14,7 @@ default-members = [
# ]

[workspace.package]
version = "0.39.0"
version = "0.39.1"
authors = ["Ritchie Vink <ritchie46@gmail.com>"]
edition = "2021"
homepage = "https://www.pola.rs/"
Expand Down Expand Up @@ -87,30 +87,30 @@ zstd = "0.13"
uuid = { version = "1.7.0", features = ["v4"] }
arboard = { version = "3.3.2", default-features = false }

polars = { version = "0.39.0", path = "crates/polars", default-features = false }
polars-compute = { version = "0.39.0", path = "crates/polars-compute", default-features = false }
polars-core = { version = "0.39.0", path = "crates/polars-core", default-features = false }
polars-error = { version = "0.39.0", path = "crates/polars-error", default-features = false }
polars-ffi = { version = "0.39.0", path = "crates/polars-ffi", default-features = false }
polars-io = { version = "0.39.0", path = "crates/polars-io", default-features = false }
polars-json = { version = "0.39.0", path = "crates/polars-json", default-features = false }
polars-lazy = { version = "0.39.0", path = "crates/polars-lazy", default-features = false }
polars-ops = { version = "0.39.0", path = "crates/polars-ops", default-features = false }
polars-parquet = { version = "0.39.0", path = "crates/polars-parquet", default-features = false }
polars-pipe = { version = "0.39.0", path = "crates/polars-pipe", default-features = false }
polars-plan = { version = "0.39.0", path = "crates/polars-plan", default-features = false }
polars-row = { version = "0.39.0", path = "crates/polars-row", default-features = false }
polars-sql = { version = "0.39.0", path = "crates/polars-sql", default-features = false }
polars-time = { version = "0.39.0", path = "crates/polars-time", default-features = false }
polars-utils = { version = "0.39.0", path = "crates/polars-utils", default-features = false }
polars = { version = "0.39.1", path = "crates/polars", default-features = false }
polars-compute = { version = "0.39.1", path = "crates/polars-compute", default-features = false }
polars-core = { version = "0.39.1", path = "crates/polars-core", default-features = false }
polars-error = { version = "0.39.1", path = "crates/polars-error", default-features = false }
polars-ffi = { version = "0.39.1", path = "crates/polars-ffi", default-features = false }
polars-io = { version = "0.39.1", path = "crates/polars-io", default-features = false }
polars-json = { version = "0.39.1", path = "crates/polars-json", default-features = false }
polars-lazy = { version = "0.39.1", path = "crates/polars-lazy", default-features = false }
polars-ops = { version = "0.39.1", path = "crates/polars-ops", default-features = false }
polars-parquet = { version = "0.39.1", path = "crates/polars-parquet", default-features = false }
polars-pipe = { version = "0.39.1", path = "crates/polars-pipe", default-features = false }
polars-plan = { version = "0.39.1", path = "crates/polars-plan", default-features = false }
polars-row = { version = "0.39.1", path = "crates/polars-row", default-features = false }
polars-sql = { version = "0.39.1", path = "crates/polars-sql", default-features = false }
polars-time = { version = "0.39.1", path = "crates/polars-time", default-features = false }
polars-utils = { version = "0.39.1", path = "crates/polars-utils", default-features = false }

[workspace.dependencies.arrow-format]
package = "polars-arrow-format"
version = "0.1.0"

[workspace.dependencies.arrow]
package = "polars-arrow"
version = "0.39.0"
version = "0.39.1"
path = "crates/polars-arrow"
default-features = false
features = [
Expand Down
1 change: 0 additions & 1 deletion crates/polars-arrow/src/buffer/immutable.rs
@@ -1,6 +1,5 @@
use std::ops::Deref;
use std::sync::Arc;
use std::usize;

use either::Either;
use num_traits::Zero;
Expand Down
5 changes: 3 additions & 2 deletions crates/polars-core/src/chunked_array/drop.rs
Expand Up @@ -7,10 +7,11 @@ impl<T: PolarsDataType> Drop for ChunkedArray<T> {
// SAFETY:
// guarded by the type system
// the transmute only convinces the type system that we are a list
// (which we are)
#[allow(clippy::transmute_undefined_repr)]
unsafe {
drop_list(std::mem::transmute(self))
drop_list(std::mem::transmute::<&mut ChunkedArray<T>, &ListChunked>(
self,
))
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/polars-core/src/chunked_array/ops/bit_repr.rs
Expand Up @@ -112,7 +112,7 @@ where
if matches!(self.dtype(), DataType::UInt64) {
let ca = self.clone();
// Convince the compiler we are this type. This keeps flags.
return unsafe { std::mem::transmute(ca) };
return unsafe { std::mem::transmute::<ChunkedArray<T>, UInt64Chunked>(ca) };
}
reinterpret_chunked_array(self)
} else {
Expand All @@ -125,7 +125,7 @@ where
if matches!(self.dtype(), DataType::UInt32) {
let ca = self.clone();
// Convince the compiler we are this type. This preserves flags.
return unsafe { std::mem::transmute(ca) };
return unsafe { std::mem::transmute::<ChunkedArray<T>, UInt32Chunked>(ca) };
}
reinterpret_chunked_array(self)
} else {
Expand Down
1 change: 1 addition & 0 deletions crates/polars-core/src/series/implementations/object.rs
Expand Up @@ -229,6 +229,7 @@ mod test {

#[test]
fn test_downcast_object() -> PolarsResult<()> {
#[allow(non_local_definitions)]
impl PolarsObject for i32 {
fn type_name() -> &'static str {
"i32"
Expand Down
5 changes: 2 additions & 3 deletions crates/polars-json/src/ndjson/deserialize.rs
Expand Up @@ -20,8 +20,7 @@ pub fn deserialize_iter<'a>(
count: usize,
) -> PolarsResult<ArrayRef> {
let mut arr: Vec<Box<dyn Array>> = Vec::new();
let mut buf =
String::with_capacity(std::cmp::min(buf_size + count + 2, std::u32::MAX as usize));
let mut buf = String::with_capacity(std::cmp::min(buf_size + count + 2, u32::MAX as usize));
buf.push('[');

fn _deserializer(s: &mut str, data_type: ArrowDataType) -> PolarsResult<Box<dyn Array>> {
Expand All @@ -41,7 +40,7 @@ pub fn deserialize_iter<'a>(
buf.push(',');

let next_row_length = row_iter.peek().map(|row| row.len()).unwrap_or(0);
if buf.len() + next_row_length >= std::u32::MAX as usize {
if buf.len() + next_row_length >= u32::MAX as usize {
let _ = buf.pop();
buf.push(']');
arr.push(_deserializer(&mut buf, data_type.clone())?);
Expand Down
6 changes: 4 additions & 2 deletions crates/polars-pipe/src/pipeline/convert.rs
Expand Up @@ -18,7 +18,7 @@ use crate::executors::{operators, sources};
use crate::expressions::PhysicalPipedExpr;
use crate::operators::{Operator, Sink as SinkTrait, Source};
use crate::pipeline::dispatcher::ThreadedSink;
use crate::pipeline::PipeLine;
use crate::pipeline::{PhysOperator, PipeLine};

pub type CallBacks = PlHashMap<Node, PlaceHolder>;

Expand Down Expand Up @@ -758,7 +758,9 @@ where

Ok(PipeLine::new(
source_objects,
unsafe { std::mem::transmute(operator_objects) },
unsafe {
std::mem::transmute::<Vec<Box<dyn Operator>>, Vec<PhysOperator>>(operator_objects)
},
sinks,
verbose,
))
Expand Down
1 change: 1 addition & 0 deletions py-polars/src/lib.rs
@@ -1,6 +1,7 @@
#![feature(vec_into_raw_parts)]
#![allow(clippy::nonstandard_macro_braces)] // Needed because clippy does not understand proc macro of PyO3
#![allow(clippy::transmute_undefined_repr)]
#![allow(non_local_definitions)]
#![allow(clippy::too_many_arguments)] // Python functions can have many arguments due to default arguments
extern crate polars as polars_rs;

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-03-28"
channel = "nightly-2024-04-15"

0 comments on commit 5e68541

Please sign in to comment.