Closed jonmmease closed 2 years ago
The thread-level backtrace when running the spec in Rust has more info:
thread 'tokio-runtime-worker' panicked at 'range end index 75 out of range for slice of length 72', library/core/src/slice/index.rs:73:5
stack backtrace:
0: rust_begin_unwind
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/core/src/panicking.rs:142:14
2: core::slice::index::slice_end_index_len_fail_rt
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/core/src/slice/index.rs:73:5
3: core::ops::function::FnOnce::call_once
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/core/src/ops/function.rs:248:5
4: core::intrinsics::const_eval_select
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/core/src/intrinsics.rs:2695:5
5: core::slice::index::slice_end_index_len_fail
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/core/src/slice/index.rs:67:9
6: <core::ops::range::Range<usize> as core::slice::index::SliceIndex<[T]>>::index_mut
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/core/src/slice/index.rs:315:13
7: core::slice::index::<impl core::ops::index::IndexMut<I> for [T]>::index_mut
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/alloc/src/vec/mod.rs:2639:9
8: <alloc::vec::Vec<T,A> as core::ops::index::IndexMut<I>>::index_mut
at /rustc/7665c3543079ebc3710b676d0fd6951bedfd4b29/library/alloc/src/vec/mod.rs:2639:9
9: datafusion_row::writer::RowWriter::set_utf8
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/row/src/writer.rs:236:9
10: datafusion_row::writer::write_field_utf8
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/row/src/writer.rs:356:5
11: datafusion_row::writer::write_field
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/row/src/writer.rs:397:17
12: datafusion_row::writer::write_row
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/row/src/writer.rs:286:17
13: datafusion::physical_plan::aggregates::row_hash::create_group_rows
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/core/src/physical_plan/aggregates/row_hash.rs:414:9
14: datafusion::physical_plan::aggregates::row_hash::group_aggregate_batch
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/core/src/physical_plan/aggregates/row_hash.rs:228:40
15: <datafusion::physical_plan::aggregates::row_hash::GroupedHashAggregateStreamV2 as futures_core::stream::Stream>::poll_next
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/core/src/physical_plan/aggregates/row_hash.rs:161:34
...
In particular, these lines:
9: datafusion_row::writer::RowWriter::set_utf8
at /home/jmmease/.cargo/git/checkouts/arrow-datafusion-71ae82d9dec9a01c/57f47ab/datafusion/row/src/writer.rs:236:9
So it looks like something is causing an index out of bounds access in DataFusion's row logic.
Oh, good news. This is a bug that was recently fixed in DataFusion by https://github.com/apache/arrow-datafusion/pull/2968. After updating the DataFusion dependency this spec works as expected.
The following Vega spec results in a PanicException when passed as input to
pre_transform_spec
Seemingly small changes to the number of characters in the strings in the
color
column change whether the exception occurs.