You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/07/28 14:07:16 UTC
[GitHub] [arrow-datafusion] alamb opened a new issue, #7125: panicked at 'internal error: entered unreachable code' in cp_solver
alamb opened a new issue, #7125:
URL: https://github.com/apache/arrow-datafusion/issues/7125
### Describe the bug
When filters are applied with predicates that contain arithmetic operators other than +/- sometimes panics happen
### To Reproduce
Run this SQL
```sql
create table foo(x int) as values (1), (2), (NULL), (4);
select * from foo where x & 1 = 5;
```
```shell
$ RUST_BACKTRACE=1 datafusion-cli
DataFusion CLI v28.0.0
❯ create table foo(x int) as values (1), (2), (NULL), (4);
0 rows in set. Query took 0.003 seconds.
❯ select * from foo where x & 1 = 5;
thread 'main' panicked at 'internal error: entered unreachable code', /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/intervals/cp_solver.rs:211:14
stack backtrace:
0: rust_begin_unwind
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:67:14
2: core::panicking::panic
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:117:5
3: datafusion_physical_expr::intervals::cp_solver::get_inverse_op
at /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/intervals/cp_solver.rs:211:14
4: datafusion_physical_expr::intervals::cp_solver::propagate_arithmetic
at /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/intervals/cp_solver.rs:233:22
5: <datafusion_physical_expr::expressions::binary::BinaryExpr as datafusion_physical_expr::physical_expr::PhysicalExpr>::propagate_constraints
at /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/expressions/binary.rs:794:13
6: datafusion_physical_expr::intervals::cp_solver::ExprIntervalGraph::propagate_constraints
at /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/intervals/cp_solver.rs:505:40
7: datafusion_physical_expr::intervals::cp_solver::ExprIntervalGraph::update_ranges
at /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/intervals/cp_solver.rs:531:26
8: datafusion_physical_expr::physical_expr::analyze
at /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/physical_expr.rs:179:11
9: <datafusion::physical_plan::filter::FilterExec as datafusion::physical_plan::ExecutionPlan>::statistics
at /Users/alamb/Software/arrow-datafusion/datafusion/core/src/physical_plan/filter.rs:210:34
10: datafusion::physical_optimizer::repartition::optimize_partitions
at /Users/alamb/Software/arrow-datafusion/datafusion/core/src/physical_optimizer/repartition.rs:228:17
11: <datafusion::physical_optimizer::repartition::Repartition as datafusion::physical_optimizer::optimizer::PhysicalOptimizerRule>::optimize
at /Users/alamb/Software/arrow-datafusion/datafusion/core/src/physical_optimizer/repartition.rs:302:13
12: datafusion::physical_planner::DefaultPhysicalPlanner::optimize_internal
at /Users/alamb/Software/arrow-datafusion/datafusion/core/src/physical_planner.rs:1873:24
13: <datafusion::physical_planner::DefaultPhysicalPlanner as datafusion::physical_planner::PhysicalPlanner>::create_physical_plan::{{closure}}
at /Users/alamb/Software/arrow-datafusion/datafusion/core/src/physical_planner.rs:425:17
14: <core::pin::Pin<P> as core::future::future::Future>::poll
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/future/future.rs:125:9
15: <datafusion::execution::context::DefaultQueryPlanner as datafusion::execution::context::QueryPlanner>::create_physical_plan::{{closure}}
at /Users/alamb/Software/arrow-datafusion/datafusion/core/src/execution/context.rs:1327:14
16: datafusion::dataframe::DataFrame::create_physical_plan::{{closure}}
17: datafusion::dataframe::DataFrame::collect::{{closure}}
18: datafusion_cli::exec::exec_and_print::{{closure}}
19: datafusion_cli::main::{{closure}}
20: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
21: tokio::runtime::context::runtime::enter_runtime
22: tokio::runtime::runtime::Runtime::block_on
23: datafusion_cli::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
### Expected behavior
The query should pass without panic
### Additional context
This was likely introduced in https://github.com/apache/arrow-datafusion/pull/6982
--
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-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] viirya closed issue #7125: panicked at 'internal error: entered unreachable code' in cp_solver
Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya closed issue #7125: panicked at 'internal error: entered unreachable code' in cp_solver
URL: https://github.com/apache/arrow-datafusion/issues/7125
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #7125: panicked at 'internal error: entered unreachable code' in cp_solver
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7125:
URL: https://github.com/apache/arrow-datafusion/issues/7125#issuecomment-1655751101
cc @berkaysynnada -- I plan to work on a fix for this
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org