should be it
This commit is contained in:
34
external/duckdb/test/issues/rigger/test_510.test
vendored
Normal file
34
external/duckdb/test/issues/rigger/test_510.test
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# name: test/issues/rigger/test_510.test
|
||||
# description: Issue 510
|
||||
# group: [rigger]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# SIMILAR TO results in an incorrect result
|
||||
statement ok
|
||||
CREATE TABLE t0(c0 INT);
|
||||
|
||||
statement ok
|
||||
INSERT INTO t0(c0) VALUES (-10);
|
||||
|
||||
query T
|
||||
SELECT '-10' SIMILAR TO '0';
|
||||
----
|
||||
0
|
||||
|
||||
query T
|
||||
SELECT cast(t0.c0 as varchar) SIMILAR TO cast(0 as varchar) FROM t0;
|
||||
----
|
||||
0
|
||||
|
||||
query T
|
||||
SELECT t0.c0::VARCHAR NOT SIMILAR TO 0::VARCHAR FROM t0;
|
||||
----
|
||||
1
|
||||
|
||||
query I
|
||||
SELECT * FROM t0 WHERE t0.c0::VARCHAR NOT SIMILAR TO 0::VARCHAR;
|
||||
----
|
||||
-10
|
||||
|
||||
Reference in New Issue
Block a user