mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:05:31 +02:00
Polars 0.38 upgrade (#12506)
# Description Polars 0.38 upgrade for both the dataframe crate and the polars plugin. --------- Co-authored-by: Jack Wright <jack.wright@disqo.com>
This commit is contained in:
@ -23,17 +23,17 @@ nu-path = { path = "../nu-path", version = "0.92.3" }
|
||||
|
||||
# Potential dependencies for extras
|
||||
chrono = { workspace = true, features = ["std", "unstable-locales"], default-features = false }
|
||||
chrono-tz = "0.8"
|
||||
chrono-tz = "0.9"
|
||||
fancy-regex = { workspace = true }
|
||||
indexmap = { version = "2.2" }
|
||||
num = {version = "0.4"}
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
sqlparser = { version = "0.43"}
|
||||
polars-io = { version = "0.37", features = ["avro"]}
|
||||
polars-arrow = { version = "0.37"}
|
||||
polars-ops = { version = "0.37"}
|
||||
polars-plan = { version = "0.37", features = ["regex"]}
|
||||
polars-utils = { version = "0.37"}
|
||||
sqlparser = { version = "0.45"}
|
||||
polars-io = { version = "0.38", features = ["avro"]}
|
||||
polars-arrow = { version = "0.38"}
|
||||
polars-ops = { version = "0.38"}
|
||||
polars-plan = { version = "0.38", features = ["regex"]}
|
||||
polars-utils = { version = "0.38"}
|
||||
typetag = "0.2"
|
||||
uuid = { version = "1.7", features = ["v4", "serde"] }
|
||||
|
||||
@ -69,7 +69,7 @@ features = [
|
||||
"to_dummies",
|
||||
]
|
||||
optional = false
|
||||
version = "0.37"
|
||||
version = "0.38"
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.92.3" }
|
||||
|
@ -10,8 +10,14 @@ use indexmap::map::IndexMap;
|
||||
use nu_protocol::{did_you_mean, PipelineData, Record, ShellError, Span, Value};
|
||||
use polars::prelude::{DataFrame, DataType, IntoLazy, PolarsObject, Series};
|
||||
use polars_plan::prelude::{lit, Expr, Null};
|
||||
use polars_utils::total_ord::TotalEq;
|
||||
use std::{cmp::Ordering, collections::HashSet, fmt::Display, hash::Hasher, sync::Arc};
|
||||
use polars_utils::total_ord::{TotalEq, TotalHash};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
collections::HashSet,
|
||||
fmt::Display,
|
||||
hash::{Hash, Hasher},
|
||||
sync::Arc,
|
||||
};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{Cacheable, PolarsPlugin};
|
||||
@ -39,6 +45,15 @@ impl DataFrameValue {
|
||||
}
|
||||
}
|
||||
|
||||
impl TotalHash for DataFrameValue {
|
||||
fn tot_hash<H>(&self, state: &mut H)
|
||||
where
|
||||
H: Hasher,
|
||||
{
|
||||
(*self).hash(state)
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for DataFrameValue {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0.get_type())
|
||||
@ -58,7 +73,7 @@ impl PartialEq for DataFrameValue {
|
||||
}
|
||||
impl Eq for DataFrameValue {}
|
||||
|
||||
impl std::hash::Hash for DataFrameValue {
|
||||
impl Hash for DataFrameValue {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
match &self.0 {
|
||||
Value::Nothing { .. } => 0.hash(state),
|
||||
|
Reference in New Issue
Block a user