Skip to content

Overflow bug in negate arithmetic operator (found by SQLancer) #11076

@2010YOUY01

Description

@2010YOUY01

Describe the bug

The following statement should return an error instead of directly crash

DataFusion CLI v39.0.0
> select (- -9223372036854775808);
thread 'main' panicked at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/arith.rs:699:1:
attempt to negate with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Found by SQLancer #11030

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions