Fix $in value for insert closure (#12209)

# Description
Fixes #12193 where the `$in` value may be null for closures provided to
`insert`.

# User-Facing Changes
The `$in` value will now always be the same as the closure parameter for
`insert`.
This commit is contained in:
Ian Manske
2024-03-14 21:43:03 +00:00
committed by GitHub
parent 9cf2e873b5
commit c950269575
5 changed files with 44 additions and 32 deletions

View File

@ -1766,14 +1766,10 @@ impl Value {
}
} else {
let new_col = if path.is_empty() {
new_val.clone()
new_val
} else {
let mut new_col = Value::record(Record::new(), new_val.span());
new_col.insert_data_at_cell_path(
path,
new_val.clone(),
head_span,
)?;
new_col.insert_data_at_cell_path(path, new_val, head_span)?;
new_col
};
record.push(col_name, new_col);