Files
email-tracker/external/duckdb/test/issues/rigger/test_538.test
2025-10-24 19:21:19 -05:00

27 lines
563 B
SQL

# name: test/issues/rigger/test_538.test
# description: Issue 538
# group: [rigger]
statement ok
PRAGMA enable_verification
# Incorrect result for predicate with shift on a BIGINT column
statement ok
CREATE TABLE t0(c0 BIGINT);
statement ok
INSERT INTO t0(c0) VALUES (-1);
statement ok
INSERT INTO t0(c0) VALUES (0);
statement error
SELECT t0.c0 AND (t0.c0<<64) FROM t0;
----
<REGEX>:Out of Range Error.*left-shift negative number.*
statement error
SELECT * FROM t0 WHERE t0.c0 AND (t0.c0<<64);
----
<REGEX>:Out of Range Error.*left-shift negative number.*