mirror of
https://github.com/nushell/nushell.git
synced 2025-06-22 02:41:37 +02:00
Fixes #15788 # Description Fixes null handling. Thanks to @MMesch for reporting and taking a first stab at fixing. Co-authored-by: Jack Wright <jack.wright@nike.com>
This commit is contained in:
parent
8b9f02246f
commit
2f74574e35
@ -792,15 +792,11 @@ fn series_to_values(
|
||||
) -> Result<Vec<Value>, ShellError> {
|
||||
match series.dtype() {
|
||||
DataType::Null => {
|
||||
let it = std::iter::repeat(Value::nothing(span));
|
||||
let values = if let Some(size) = maybe_size {
|
||||
Either::Left(it.take(size))
|
||||
if let Some(size) = maybe_size {
|
||||
Ok(vec![Value::nothing(span); size])
|
||||
} else {
|
||||
Either::Right(it)
|
||||
Ok(vec![Value::nothing(span); series.len()])
|
||||
}
|
||||
.collect::<Vec<Value>>();
|
||||
|
||||
Ok(values)
|
||||
}
|
||||
DataType::UInt8 => {
|
||||
let casted = series.u8().map_err(|e| ShellError::GenericError {
|
||||
|
Loading…
x
Reference in New Issue
Block a user