adriangb commented on issue #16452:
URL: https://github.com/apache/datafusion/issues/16452#issuecomment-2993339850

   I can confirm it's related to #15770. It seems like there may be multiple 
errors. This is one I found tonight:
   
   ```
   thread 'tokio-runtime-worker' panicked at 
/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.41/src/naive/date/mod.rs:1911:38:
   `NaiveDate + TimeDelta` overflowed
   stack backtrace:
      0: __rustc::rust_begin_unwind
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/std/src/panicking.rs:697:5
      1: core::panicking::panic_fmt
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/panicking.rs:75:14
      2: core::panicking::panic_display
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/panicking.rs:261:5
      3: core::option::expect_failed
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/option.rs:2024:5
      4: core::option::Option<T>::expect
                at 
/.rustup/toolchains/1.87.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:933:21
      5: <chrono::naive::date::NaiveDate as 
core::ops::arith::Add<chrono::time_delta::TimeDelta>>::add
                at 
/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.41/src/naive/date/mod.rs:1911:9
      6: arrow_array::types::Date64Type::to_naive_date
                at 
/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arrow-array-55.1.0/src/types.rs:1036:9
      7: <datafusion_common::scalar::ScalarValue as 
core::fmt::Display>::fmt::{{closure}}
                at 
/GitHub/datafusion/datafusion/common/src/scalar/mod.rs:3823:45
      8: core::option::Option<T>::map
                at 
/.rustup/toolchains/1.87.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1119:29
      9: <datafusion_common::scalar::ScalarValue as core::fmt::Display>::fmt
                at 
/GitHub/datafusion/datafusion/common/src/scalar/mod.rs:3823:35
     10: core::fmt::rt::Argument::fmt
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/fmt/rt.rs:184:76
     11: core::fmt::write
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/fmt/mod.rs:1481:21
     12: <&mut W as core::fmt::Write::write_fmt::SpecWriteFmt>::spec_write_fmt
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/fmt/mod.rs:229:21
     13: core::fmt::Write::write_fmt
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/fmt/mod.rs:234:9
     14: alloc::fmt::format::format_inner
                at 
/rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/alloc/src/fmt.rs:649:14
     15: alloc::fmt::format::{{closure}}
                at 
/.rustup/toolchains/1.87.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/fmt.rs:654:34
     16: core::option::Option<T>::map_or_else
                at 
/.rustup/toolchains/1.87.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/option.rs:1225:21
     17: alloc::fmt::format
                at 
/.rustup/toolchains/1.87.0-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/fmt.rs:654:5
     18: 
datafusion_physical_expr::expressions::literal::Literal::new_with_metadata
                at 
/GitHub/datafusion/datafusion/physical-expr/src/expressions/literal.rs:70:24
     19: datafusion_physical_expr::expressions::literal::Literal::new
                at 
/GitHub/datafusion/datafusion/physical-expr/src/expressions/literal.rs:61:9
     20: datafusion_physical_expr::expressions::literal::lit
                at 
/GitHub/datafusion/datafusion/physical-expr/src/expressions/literal.rs:143:41
     21: datafusion_physical_plan::topk::TopK::update_filter
                at 
/GitHub/datafusion/datafusion/physical-plan/src/topk/mod.rs:314:17
   ```
   
   But if I comment out `update_filters()` there are no failures. I *think* the 
`update_filters()` function may be the culprit of all of the evils and it's 
manifesting via some sort of unstable sort / mishandling of nulls _and_ this 
other random bug with Display for Date64.
   
   Bizarre... will keep pushing to find a root cause and see if we can address 
it. If I can't get it sorted over the weekend @alamb I'd propose we revert the 
TopK specific part of that PR to unblock the rest of the project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to