Skip to content

Commit

Permalink
fix zero cnt
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Axel <[email protected]>
  • Loading branch information
KveinAxel committed Sep 22, 2023
1 parent c4d2fda commit e21c086
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/expr/src/expr/expr_udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ impl UdfExpression {
uncompact_builder.append(array.datum_at(idx));
last_u = Some(u);
}
let zeros = if let Some(last_u) = last_u {
vis.len() - last_u - 1
} else {
vis.len()
};
for _ in 0..zeros {
uncompact_builder.append_null();
}
let array = uncompact_builder.finish();
Ok(Arc::new(array))
}
Expand Down

0 comments on commit e21c086

Please sign in to comment.