datafusion_spark/function/bitmap/
mod.rs1pub mod bitmap_bit_position;
19pub mod bitmap_bucket_number;
20pub mod bitmap_count;
21
22use datafusion_expr::ScalarUDF;
23use datafusion_functions::make_udf_function;
24use std::sync::Arc;
25
26make_udf_function!(bitmap_count::BitmapCount, bitmap_count);
27make_udf_function!(bitmap_bit_position::BitmapBitPosition, bitmap_bit_position);
28make_udf_function!(
29 bitmap_bucket_number::BitmapBucketNumber,
30 bitmap_bucket_number
31);
32
33pub mod expr_fn {
34 use datafusion_functions::export_functions;
35
36 export_functions!((
37 bitmap_count,
38 "Returns the number of set bits in the input bitmap.",
39 arg
40 ));
41 export_functions!((
42 bitmap_bit_position,
43 "Returns the bit position for the given input child expression.",
44 arg
45 ));
46 export_functions!((
47 bitmap_bucket_number,
48 "Returns the bucket number for the given input child expression.",
49 arg
50 ));
51}
52
53pub fn functions() -> Vec<Arc<ScalarUDF>> {
54 vec![
55 bitmap_count(),
56 bitmap_bit_position(),
57 bitmap_bucket_number(),
58 ]
59}