mirror of
https://github.com/nushell/nushell.git
synced 2025-04-20 19:28:21 +02:00
All of the dataframe commands ported over with no issues... ### 11 tests are commented out (for now) So 100 of the original 111 tests are passing with only 11 tests being ignored for now.. As per our conversation in the core team meeting on Wednesday I took @jntrnr suggestion and just commented out the tests dealing with [IntoDatetime](https://github.com/nushell/nushell/blob/main/crates/nu-command/src/conversions/into/mod.rs) Later on we can move this functionality out of nu-command if we decide it makes sense... ### The following tests were ignored... ```rust modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_day.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_hour.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_minute.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_month.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_nanosecond.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_ordinal.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_second.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_week.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_weekday.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_year.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/string/strftime.rs ```
70 lines
1.8 KiB
Rust
70 lines
1.8 KiB
Rust
mod alias;
|
|
mod arg_where;
|
|
mod as_nu;
|
|
mod col;
|
|
mod concat_str;
|
|
mod expressions_macro;
|
|
mod is_in;
|
|
mod lit;
|
|
mod otherwise;
|
|
mod quantile;
|
|
mod when;
|
|
|
|
use nu_protocol::engine::StateWorkingSet;
|
|
|
|
pub(crate) use crate::dataframe::expressions::alias::ExprAlias;
|
|
use crate::dataframe::expressions::arg_where::ExprArgWhere;
|
|
use crate::dataframe::expressions::as_nu::ExprAsNu;
|
|
pub(super) use crate::dataframe::expressions::col::ExprCol;
|
|
pub(super) use crate::dataframe::expressions::concat_str::ExprConcatStr;
|
|
pub(crate) use crate::dataframe::expressions::expressions_macro::*;
|
|
pub(super) use crate::dataframe::expressions::is_in::ExprIsIn;
|
|
pub(super) use crate::dataframe::expressions::lit::ExprLit;
|
|
pub(super) use crate::dataframe::expressions::otherwise::ExprOtherwise;
|
|
pub(super) use crate::dataframe::expressions::quantile::ExprQuantile;
|
|
pub(super) use crate::dataframe::expressions::when::ExprWhen;
|
|
|
|
pub fn add_expressions(working_set: &mut StateWorkingSet) {
|
|
macro_rules! bind_command {
|
|
( $command:expr ) => {
|
|
working_set.add_decl(Box::new($command));
|
|
};
|
|
( $( $command:expr ),* ) => {
|
|
$( working_set.add_decl(Box::new($command)); )*
|
|
};
|
|
}
|
|
|
|
// Dataframe commands
|
|
bind_command!(
|
|
ExprAlias,
|
|
ExprArgWhere,
|
|
ExprCol,
|
|
ExprConcatStr,
|
|
ExprCount,
|
|
ExprLit,
|
|
ExprAsNu,
|
|
ExprWhen,
|
|
ExprOtherwise,
|
|
ExprQuantile,
|
|
ExprList,
|
|
ExprAggGroups,
|
|
ExprFlatten,
|
|
ExprExplode,
|
|
ExprCount,
|
|
ExprFirst,
|
|
ExprLast,
|
|
ExprNUnique,
|
|
ExprIsIn,
|
|
ExprIsNotNull,
|
|
ExprIsNull,
|
|
ExprNot,
|
|
ExprMax,
|
|
ExprMin,
|
|
ExprSum,
|
|
ExprMean,
|
|
ExprMedian,
|
|
ExprStd,
|
|
ExprVar
|
|
);
|
|
}
|