Skip to content

Commit fc25bd6

Browse files
authored
Merge branch 'develop' into alpha/ext
2 parents 5b99fa6 + 5d50f72 commit fc25bd6

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.github/workflows/bench.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
strategy:
4444
matrix:
4545
benchmark:
46-
- id: random_access
46+
- id: random-access-bench
4747
name: Random Access
48-
- id: compress
48+
- id: compress-bench
4949
name: Compression
5050
steps:
5151
- uses: runs-on/action@v2
@@ -66,9 +66,8 @@ jobs:
6666
shell: bash
6767
env:
6868
RUSTFLAGS: "-C target-cpu=native -C force-frame-pointers=yes"
69-
# The main difference between this and `bench-pr.yml` is that we add the `lance` feature.
7069
run: |
71-
cargo build --bin ${{ matrix.benchmark.id }} --package vortex-bench --profile release_debug --features lance
70+
cargo build --bin ${{ matrix.benchmark.id }} --package vortex-bench --profile release_debug
7271
7372
- name: Setup Polar Signals
7473
uses: polarsignals/[email protected]

vortex-array/src/arrays/decimal/compute/fill_null.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ impl FillNullKernel for DecimalVTable {
2828
let is_invalid = is_valid.to_bool().bit_buffer().not();
2929
match_each_decimal_value_type!(array.values_type(), |T| {
3030
let mut buffer = array.buffer::<T>().into_mut();
31-
let fill_value = fill_value
32-
.as_decimal()
31+
let decimal_scalar = fill_value.as_decimal();
32+
let decimal_value = decimal_scalar
3333
.decimal_value()
34-
.and_then(|v| v.cast::<T>())
35-
.vortex_expect("top-level fill_null ensure non-null fill value");
34+
.vortex_expect("fill_null requires a non-null fill value");
35+
let fill_value = decimal_value
36+
.cast::<T>()
37+
.vortex_expect("fill value does not fit in array's decimal storage type");
3638
for invalid_index in is_invalid.set_indices() {
3739
buffer[invalid_index] = fill_value;
3840
}

vortex-array/src/compute/fill_null.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ pub fn fill_null(array: &dyn Array, fill_value: &Scalar) -> VortexResult<ArrayRe
6363
}
6464

6565
pub trait FillNullKernel: VTable {
66+
/// Kernel for replacing null values in an array with a fill value.
67+
///
68+
/// TODO(connor): Actually enforce these constraints (so that casts do not fail).
69+
///
70+
/// Implementations can assume that:
71+
/// - The array has at least one null value (not all valid, not all invalid).
72+
/// - The fill value is non-null.
73+
/// - For decimal arrays, the fill value can be successfully cast to the array's storage type.
6674
fn fill_null(&self, array: &Self::Array, fill_value: &Scalar) -> VortexResult<ArrayRef>;
6775
}
6876

0 commit comments

Comments
 (0)