Replace manual Record::get implementation (#13525)

Let's simplify here
This commit is contained in:
Stefan Holderbach 2024-08-03 01:14:44 +02:00 committed by GitHub
parent 63f00e78d1
commit 85b06b22d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,14 +177,12 @@ fn run_histogram(
match v { match v {
// parse record, and fill valid value to actual input. // parse record, and fill valid value to actual input.
Value::Record { val, .. } => { Value::Record { val, .. } => {
for (c, v) in val.iter() { if let Some(v) = val.get(col_name) {
if c == col_name {
if let Ok(v) = HashableValue::from_value(v.clone(), head_span) { if let Ok(v) = HashableValue::from_value(v.clone(), head_span) {
inputs.push(v); inputs.push(v);
} }
} }
} }
}
// Propagate existing errors. // Propagate existing errors.
Value::Error { error, .. } => return Err(*error), Value::Error { error, .. } => return Err(*error),
_ => continue, _ => continue,