Skip to content

Commit

Permalink
fix bug in extract_needed_columns (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
waruto210 committed Sep 9, 2022
1 parent 159a27b commit dd42544
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,13 @@ fn extract_needed_columns(

use crate::utils::expr::eval_pred::zip_option_vecs;

// Some(vec[]) means need all props, so can't merge it with props needed in filter
if let Some(out_columns) = out_columns {
if out_columns.is_empty() {
return Ok(Some(Vec::with_capacity(0)))
}
}

let filter_needed = if let Some(filter) = filter { filter.as_ref().extract_prop_ids() } else { None };
let columns = zip_option_vecs(filter_needed, out_columns.cloned());
// remove duplicated prop ids
Expand Down

0 comments on commit dd42544

Please sign in to comment.