Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI failed due to the dependency lexical-write-integer upgrade #13686

Closed
jayzhan211 opened this issue Dec 8, 2024 · 3 comments · Fixed by Alexhuszagh/rust-lexical#193 or #13693
Closed
Labels
bug Something isn't working

Comments

@jayzhan211
Copy link
Contributor

jayzhan211 commented Dec 8, 2024

Describe the bug

CI failed because of the dependency upgrade to lexical-write-integer v1.0.4

The panic happens to the code change in recent release
Alexhuszagh/rust-lexical@6b518e5

not sure what should be fixed yet

To Reproduce

CI link https://github.com/apache/datafusion/actions/runs/12219959283/job/34087125878?pr=13372

---- dataframe::tests::test_aggregate_subexpr stdout ----
thread 'dataframe::tests::test_aggregate_subexpr' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/jeaiii.rs:304:29:
range end index 20 out of range for slice of length 19
stack backtrace:
   0: rust_begin_unwind
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
   2: core::slice::index::slice_end_index_len_fail_rt
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/slice/index.rs:64:5
   3: core::slice::index::slice_end_index_len_fail
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/slice/index.rs:58:5
   4: index_mut<u8>
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/slice/index.rs:477:13
   5: index_mut<u8>
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/slice/index.rs:555:9
   6: index_mut<u8, core::ops::range::RangeTo<usize>>
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/slice/index.rs:27:9
   7: from_u64
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/jeaiii.rs:304:29
   8: decimal
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/decimal.rs:258:17
   9: write_integer<u64, 202824096036516704239472512860172, 5172014448931175958106549077934080, 104>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/write.rs:79:9
  10: write_mantissa<u64, 2028240960365[1670](https://github.com/apache/datafusion/actions/runs/12219959283/job/34087125878?pr=13372#step:4:1671)4239472512860172>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/write.rs:22:13
  11: signed<i64, u64, 202824096036516704239472512860172>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/api.rs:58:9
  12: to_lexical
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-write-integer-1.0.4/src/api.rs:116:27
  13: to_lexical
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-core-1.0.3/src/lib.rs:520:17
  14: write<i64>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lexical-core-1.0.3/src/lib.rs:609:5
  15: write
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-cast-53.3.0/src/display.rs:425:25
  16: write<&arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::Int64Type>>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-cast-53.3.0/src/display.rs:361:9
  17: write<&arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::Int64Type>>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-cast-53.3.0/src/display.rs:394:9
  18: fmt
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-cast-53.3.0/src/display.rs:192:15
  19: to_string<arrow_cast::display::ValueFormatter>
             at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/alloc/src/string.rs:2682:9
  20: new<arrow_cast::display::ValueFormatter>
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/comfy-table-7.1.3/src/cell.rs:29:23
  21: create_table
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-cast-53.3.0/src/pretty.rs:105:28
  22: pretty_format_batches_with_options
             at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-cast-53.3.0/src/pretty.rs:45:5
  23: {async_block#0}
             at ./src/dataframe/mod.rs:2668:9

No response

Expected behavior

No response

Additional context

No response

@jayzhan211
Copy link
Contributor Author

I quick fix is to force the arrow-rs dependency back to 1.0.2

lexical-core = { version = "1.0.2", default-features = false, features = ["write-integers", "write-floats", "parse-integers", "parse-floats"] }

and create a patch and update it to datafusion

@alamb
Copy link
Contributor

alamb commented Dec 8, 2024

I will file an upstream ticket with lexical-core
Update: Alexhuszagh/rust-lexical#191

@Alexhuszagh
Copy link
Contributor

This should be patched as of v1.0.5. Drafting a PR now.

Alexhuszagh added a commit to Alexhuszagh/datafusion that referenced this issue Dec 8, 2024
Issue was patched as of lexical release 1.0.5.

Reverts apache#13689
Closes apache#13686
Alexhuszagh added a commit to Alexhuszagh/rust-lexical that referenced this issue Dec 8, 2024
github-merge-queue bot pushed a commit to feldera/feldera that referenced this issue Dec 8, 2024
`lexical-write-integer` crate "1.0.4" breaks datafusion apache/datafusion#13686

Update Cargo.toml to use the latest working version instead.

Signed-off-by: Leonid Ryzhyk <[email protected]>
github-merge-queue bot pushed a commit to feldera/feldera that referenced this issue Dec 9, 2024
`lexical-write-integer` crate "1.0.4" breaks datafusion apache/datafusion#13686

Update Cargo.toml to use the latest working version instead.

Signed-off-by: Leonid Ryzhyk <[email protected]>
zhuliquan pushed a commit to zhuliquan/datafusion that referenced this issue Dec 11, 2024
Issue was patched as of lexical release 1.0.5.

Reverts apache#13689
Closes apache#13686
zhuliquan pushed a commit to zhuliquan/datafusion that referenced this issue Dec 15, 2024
Issue was patched as of lexical release 1.0.5.

Reverts apache#13689
Closes apache#13686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants