diff --git a/README.md b/README.md index 1deb11a205..64ff0e8015 100644 --- a/README.md +++ b/README.md @@ -262,7 +262,6 @@ Nu adheres closely to a set of goals that make up its design philosophy. As feat | pivot --header-row | Pivot the tables, making columns into rows and vice versa | | reject ...columns | Remove the given columns from the table | | reverse | Reverses the table. | -| split-by column | Creates a new table with the data from the inner tables splitted by the column given | | skip amount | Skip a number of rows | | skip-while condition | Skips rows while the condition matches. | | sort-by ...columns | Sort by the given columns | diff --git a/features.toml b/features.toml index f7cea6d9e9..e1cf56e33d 100644 --- a/features.toml +++ b/features.toml @@ -10,4 +10,12 @@ reason = """ This is laying the groundwork for merging coloring and parsing. It also makes token_nodes.atomic() naturally work with coloring, which is pretty useful on its own. """ +enabled = false + +[data_processing_primitives] + +description = "Groundwork so tables can be data processed" +reason = """ +These will allow take tables and be able to transform, process, and explore. +""" enabled = false \ No newline at end of file diff --git a/src/cli.rs b/src/cli.rs index a66dd6cbbf..d53e587a38 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -259,7 +259,6 @@ pub async fn cli() -> Result<(), Box> { whole_stream_command(Previous), whole_stream_command(Debug), whole_stream_command(Shells), - whole_stream_command(SplitBy), whole_stream_command(SplitColumn), whole_stream_command(SplitRow), whole_stream_command(Lines), @@ -319,6 +318,8 @@ pub async fn cli() -> Result<(), Box> { whole_stream_command(Table), whole_stream_command(Version), whole_stream_command(Which), + #[cfg(data_processing_primitives)] + whole_stream_command(SplitBy), ]); #[cfg(feature = "clipboard")] diff --git a/src/commands.rs b/src/commands.rs index 0a71a93631..5300a39ec1 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -55,7 +55,10 @@ pub(crate) mod shells; pub(crate) mod size; pub(crate) mod skip_while; pub(crate) mod sort_by; + +#[cfg(data_processing_primitives)] pub(crate) mod split_by; + pub(crate) mod split_column; pub(crate) mod split_row; pub(crate) mod table; @@ -130,7 +133,10 @@ pub(crate) use shells::Shells; pub(crate) use size::Size; pub(crate) use skip_while::SkipWhile; pub(crate) use sort_by::SortBy; + +#[cfg(data_processing_primitives)] pub(crate) use split_by::SplitBy; + pub(crate) use split_column::SplitColumn; pub(crate) use split_row::SplitRow; pub(crate) use table::Table; diff --git a/tests/commands_test.rs b/tests/commands_test.rs index 7b31c6ae4d..547f1e0080 100644 --- a/tests/commands_test.rs +++ b/tests/commands_test.rs @@ -56,6 +56,7 @@ fn group_by_errors_if_unknown_column_name() { }) } +#[cfg(data_processing_primitives)] #[test] fn split_by() { Playground::setup("split_by_test_1", |dirs, sandbox| { @@ -85,6 +86,7 @@ fn split_by() { }) } +#[cfg(data_processing_primitives)] #[test] fn split_by_errors_if_no_table_given_as_input() { Playground::setup("split_by_test_2", |dirs, sandbox| {