fix select tests (#5577)

This commit is contained in:
WindSoilder
2022-05-18 19:20:26 +08:00
committed by GitHub
parent bb079608dd
commit 7d9a77f179
2 changed files with 6 additions and 7 deletions

View File

@ -126,7 +126,7 @@ fn select(
//FIXME: improve implementation to not clone
let fetcher = input_val.clone().follow_cell_path(&path.members)?;
cols.push(path.into_string());
cols.push(path.into_string().replace('.', "_"));
vals.push(fetcher);
}
@ -150,11 +150,11 @@ fn select(
//FIXME: improve implementation to not clone
match x.clone().follow_cell_path(&path.members) {
Ok(value) => {
cols.push(path.into_string());
cols.push(path.into_string().replace('.', "_"));
vals.push(value);
}
Err(_) => {
cols.push(path.into_string());
cols.push(path.into_string().replace('.', "_"));
vals.push(Value::Nothing { span });
}
}
@ -175,7 +175,7 @@ fn select(
// FIXME: remove clone
let result = v.clone().follow_cell_path(&cell_path.members)?;
cols.push(cell_path.into_string());
cols.push(cell_path.into_string().replace('.', "_"));
vals.push(result);
}