File: distinct_from_pushdown.test

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (27 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# name: test/optimizer/pushdown/distinct_from_pushdown.test
# description: Test DISTINCT FROM pushed down into scans
# group: [pushdown]

statement ok
create table test as select 'tst' as tst;

query I
select * from test where tst is not distinct from 'a' or tst is not distinct from 'b';
----

query I
select * from test where tst is distinct from 'a' or tst is distinct from 'b';
----
tst

statement ok
create table test2 as select 42 as tst;

query I
select * from test2 where tst is not distinct from 12 or tst is not distinct from 13;
----

query I
select * from test2 where tst is distinct from 12 or tst is distinct from 13
----
42