File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 11\set ON_ERROR_STOP on
22
3- SELECT create_table_with_encrypted();
4- SELECT seed_encrypted_json();
3+ --
4+ -- ORE GROUP BY
5+ --
6+ DO $$
7+ BEGIN
58
9+ PERFORM create_table_with_encrypted();
10+
11+ -- Copy ORE data into encrypted
12+ INSERT INTO encrypted(e) SELECT e FROM ore WHERE ore .id = 42 ;
13+ INSERT INTO encrypted(e) SELECT e FROM ore WHERE ore .id = 42 ;
14+ INSERT INTO encrypted(e) SELECT e FROM ore WHERE ore .id = 42 ;
15+ INSERT INTO encrypted(e) SELECT e FROM ore WHERE ore .id = 42 ;
16+ INSERT INTO encrypted(e) SELECT e FROM ore WHERE ore .id = 99 ;
17+ INSERT INTO encrypted(e) SELECT e FROM ore WHERE ore .id = 99 ;
18+
19+ -- Should be the rows with value of 42
20+ PERFORM assert_id(
21+ ' GROUP BY eql_v2_encrypted' ,
22+ ' SELECT count(id) FROM encrypted GROUP BY e ORDER BY count(id) DESC' ,
23+ 4 );
24+ END;
25+ $$ LANGUAGE plpgsql;
626
727--
828-- Confirm index used correctly
@@ -157,8 +177,6 @@ DO $$
157177
158178 EXECUTE ' EXPLAIN ANALYZE SELECT e::jsonb FROM encrypted WHERE e = ' ' ("{\" blah\" : \" vtha\" }")' ' ;' into result;
159179
160- PERFORM eql_v2 .log (result);
161-
162180 IF position(' Index Only Scan using encrypted' in result) > 0 THEN
163181 ASSERT true;
164182 ELSE
You can’t perform that action at this time.
0 commit comments