Port merge command from Nushell (#808)

* Add example test to zip

* Port merge command from Nushell

On top of the original merge, this one should not collect a stream
returned from the merged block and allows merging records.
This commit is contained in:
Jakub Žádník
2022-01-22 01:50:26 +02:00
committed by GitHub
parent e1272f3b73
commit 564c2dd7d1
6 changed files with 258 additions and 3 deletions

View File

@ -797,6 +797,15 @@ impl Value {
span: Span::test_data(),
}
}
// Only use these for test data. Should not be used in user data
pub fn test_record(cols: Vec<impl Into<String>>, vals: Vec<Value>) -> Value {
Value::Record {
cols: cols.into_iter().map(|s| s.into()).collect(),
vals,
span: Span::test_data(),
}
}
}
impl Default for Value {