Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Only get displayer for the interesting field
Browse files Browse the repository at this point in the history
  • Loading branch information
simonvandel committed Oct 30, 2021
1 parent ad5f95d commit 29d8bb4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/array/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,9 @@ pub fn get_value_display<'a>(array: &'a dyn Array) -> Box<dyn Fn(usize) -> Strin
}
Union(_, _, _) => {
let array = array.as_any().downcast_ref::<UnionArray>().unwrap();
let displays = array
.fields()
.iter()
.map(|x| get_display(x.as_ref()))
.collect::<Vec<_>>();
Box::new(move |row: usize| {
let (field, index) = array.index(row);
displays[field](index)
get_display(array.fields()[field].as_ref())(index)
})
}
Extension(_, _, _) => todo!(),
Expand Down

0 comments on commit 29d8bb4

Please sign in to comment.