From 9083157baafac9c3a9d132e6b66016758382a048 Mon Sep 17 00:00:00 2001 From: Solomon Date: Tue, 29 Oct 2024 05:37:44 -0600 Subject: [PATCH] support table literal syntax in `join` right-table argument (#14190) # Description Makes `join` `right-table` support table literal notation instead of parsing the column list (treated as empty data): ```diff [{a: 1}] | join [[a]; [1]] a | to nuon -[] +[[a]; [1]] ``` Fixes #13537, fixes #14134 --- crates/nu-command/src/filters/join.rs | 2 +- crates/nu-command/tests/commands/join.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/nu-command/src/filters/join.rs b/crates/nu-command/src/filters/join.rs index 379366d4c9..7f3bbae238 100644 --- a/crates/nu-command/src/filters/join.rs +++ b/crates/nu-command/src/filters/join.rs @@ -29,7 +29,7 @@ impl Command for Join { Signature::build("join") .required( "right-table", - SyntaxShape::List(Box::new(SyntaxShape::Any)), + SyntaxShape::Table([].into()), "The right table in the join.", ) .required( diff --git a/crates/nu-command/tests/commands/join.rs b/crates/nu-command/tests/commands/join.rs index 69aa39f59a..a3c2bad11e 100644 --- a/crates/nu-command/tests/commands/join.rs +++ b/crates/nu-command/tests/commands/join.rs @@ -355,7 +355,6 @@ fn do_cases_where_result_differs_between_join_types_with_different_join_keys(joi } } -#[ignore] #[test] fn test_alternative_table_syntax() { let join_type = "--inner";