Skip to main content

vortex_array/arrays/decimal/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4mod array;
5pub use array::DecimalArrayExt;
6pub use array::DecimalData;
7pub use array::DecimalDataParts;
8pub use vtable::DecimalArray;
9
10pub(crate) mod compute;
11
12mod vtable;
13pub use compute::rules::DecimalMaskedValidityRule;
14pub use vtable::Decimal;
15
16mod utils;
17pub use utils::*;
18
19#[cfg(test)]
20mod tests {
21    use arrow_array::Decimal128Array;
22
23    #[test]
24    fn test_decimal() {
25        // They pass it b/c the DType carries the information. No other way to carry a
26        // dtype except via the array.
27        let value = Decimal128Array::new_null(100);
28        let numeric = value.value(10);
29        assert_eq!(numeric, 0i128);
30    }
31}