Skip to content

Commit 8b77588

Browse files
committed
test: add test for no index case
1 parent 22eac95 commit 8b77588

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/operators/operator_class_test.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ DO $$
164164
RAISE EXCEPTION 'Expected Index Only Scan: %', result;
165165
END IF;
166166

167+
-- Cast to jsonb
168+
EXECUTE 'EXPLAIN ANALYZE SELECT e::jsonb FROM encrypted WHERE e = ''{"hm": "abc"}''::jsonb;' into result;
169+
170+
-- INDEX IS NOT USED
171+
IF position('Seq Scan on encrypted' in result) > 0 THEN
172+
ASSERT true;
173+
ELSE
174+
RAISE EXCEPTION 'Unexpected Seq Scan: %', result;
175+
END IF;
176+
167177
-- Cast to jsonb to eql_v2_encrypted
168178
EXECUTE 'EXPLAIN ANALYZE SELECT e::jsonb FROM encrypted WHERE e = ''{"hm": "abc"}''::jsonb::eql_v2_encrypted;' into result;
169179

0 commit comments

Comments
 (0)