should be it
This commit is contained in:
64
external/duckdb/test/sql/binder/similar_to.test
vendored
Normal file
64
external/duckdb/test/sql/binder/similar_to.test
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
# name: test/sql/binder/similar_to.test
|
||||
# description: Test similar to suggestions
|
||||
# group: [binder]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
statement ok
|
||||
CREATE TABLE depdelay_minutes(depdelay_minutes INTEGER);
|
||||
|
||||
statement error
|
||||
SELECT * FROM depdelay
|
||||
----
|
||||
depdelay_minutes
|
||||
|
||||
statement error
|
||||
SELECT depdelay FROM depdelay_minutes
|
||||
----
|
||||
depdelay_minutes
|
||||
|
||||
statement ok
|
||||
CREATE TABLE lineitem(i INTEGER);
|
||||
|
||||
statement error
|
||||
SELECT * FROM li
|
||||
----
|
||||
lineitem
|
||||
|
||||
statement error
|
||||
SELECT * FROM lineitem_long
|
||||
----
|
||||
lineitem
|
||||
|
||||
statement error
|
||||
select jaro_winkler_('x', 'y');
|
||||
----
|
||||
jaro_winkler_similarity
|
||||
|
||||
# check entries in other schemas
|
||||
statement ok
|
||||
create schema s1;
|
||||
|
||||
statement ok
|
||||
create table s1.my_lineitem(i int);
|
||||
|
||||
# exact match: show it
|
||||
statement error
|
||||
select * from my_lineitem;
|
||||
----
|
||||
s1.my_lineitem
|
||||
|
||||
# we prefer the current schema even if another schema has a slightly better match
|
||||
statement error
|
||||
select * from m_lineitem;
|
||||
----
|
||||
lineitem
|
||||
|
||||
statement ok
|
||||
create table s1.orders(i int)
|
||||
|
||||
statement error
|
||||
select * from ord
|
||||
----
|
||||
s1.orders
|
||||
Reference in New Issue
Block a user