|
1 | 1 | -
|
2 |
| - ID: '0.16.0-0' |
| 2 | + ID: 'query0' |
3 | 3 | Name: 'All commits'
|
4 | 4 | Statements:
|
5 | 5 | - SELECT * FROM commits
|
6 | 6 | -
|
7 |
| - ID: '0.16.0-1' |
| 7 | + ID: 'query1' |
8 | 8 | Name: 'Last commit messages in HEAD for every repository'
|
9 | 9 | Statements:
|
10 | 10 | - SELECT c.commit_message FROM refs rJOIN commits c ON r.commit_hash = c.commit_hashWHEREr.ref_name = 'HEAD'
|
11 | 11 | -
|
12 |
| - ID: '0.16.0-2' |
| 12 | + ID: 'query2' |
13 | 13 | Name: 'All commit messages in HEAD history for every repository'
|
14 | 14 | Statements:
|
15 | 15 | - SELECT c.commit_message FROM commits cNATURAL JOIN ref_commits rWHERE r.ref_name = 'HEAD'
|
16 | 16 | -
|
17 |
| - ID: '0.16.0-3' |
| 17 | + ID: 'query3' |
18 | 18 | Name: 'Top 10 repositories by commit count in HEAD'
|
19 | 19 | Statements:
|
20 | 20 | - SELECT repository_id,commit_count FROM (SELECT r.repository_id,count(*) AS commit_count FROM ref_commits r WHERE r.ref_name = 'HEAD' GROUP BY r.repository_id) AS q ORDER BY commit_count DESC LIMIT 10
|
21 | 21 | -
|
22 |
| - ID: '0.16.0-4' |
| 22 | + ID: 'query4' |
23 | 23 | Name: 'Top 10 repositories by contributor count (all branches)'
|
24 | 24 | Statements:
|
25 | 25 | - SELECT repository_id,contributor_count FROM (SELECT repository_id, COUNT(DISTINCT commit_author_email) AS contributor_count FROM commits GROUP BY repository_id) AS q ORDER BY contributor_count DESC LIMIT 10
|
26 | 26 | -
|
27 |
| - ID: '0.16.0-5' |
| 27 | + ID: 'query5' |
28 | 28 | Name: 'Create pilosa index on language UDF'
|
29 | 29 | Statements:
|
30 | 30 | - CREATE INDEX language_idx ON files USING pilosa (language(file_path, blob_content)) WITH (async = false)
|
31 | 31 | -
|
32 |
| - ID: '0.16.0-6' |
| 32 | + ID: 'query6' |
33 | 33 | Name: 'Create pilosalib index on language UDF'
|
34 | 34 | Statements:
|
35 | 35 | - CREATE INDEX language_idx ON files USING pilosalib (language(file_path, blob_content)) WITH (async = false)
|
36 | 36 | -
|
37 |
| - ID: '0.16.0-7' |
| 37 | + ID: 'query7' |
38 | 38 | Name: 'Query by language using the pilosa index'
|
39 | 39 | Statements:
|
40 | 40 | - CREATE INDEX language_idx ON files USING pilosa (language(file_path, blob_content)) WITH (async = false)
|
41 | 41 | - SELECT file_path FROM files WHERE language(file_path, blob_content) = 'Go'
|
42 | 42 | - DROP INDEX language_idx ON files
|
43 | 43 | -
|
44 |
| - ID: '0.16.0-8' |
| 44 | + ID: 'query8' |
45 | 45 | Name: 'Query by language using the pilosalib index'
|
46 | 46 | Statements:
|
47 | 47 | - CREATE INDEX language_idx ON files USING pilosalib (language(file_path, blob_content)) WITH (async = false)
|
48 | 48 | - SELECT file_path FROM files WHERE language(file_path, blob_content) = 'Go'
|
49 | 49 | - DROP INDEX language_idx ON files
|
50 | 50 | -
|
51 |
| - ID: '0.16.0-9' |
| 51 | + ID: 'query9' |
52 | 52 | Name: 'Query all files from HEAD'
|
53 | 53 | Statements:
|
54 | 54 | - SELECT cf.file_path, f.blob_content FROM ref_commits r NATURAL JOIN commit_files cf NATURAL JOIN files f WHERE r.ref_name = 'HEAD' AND r.index = 0
|
55 | 55 | -
|
56 |
| - ID: '0.16.0-10' |
| 56 | + ID: 'query10' |
57 | 57 | Name: 'Get all LICENSE blobs using pilosa index'
|
58 | 58 | Statements:
|
59 | 59 | - CREATE INDEX file_path_idx ON files USING pilosa (file_path) WITH (async = false)
|
60 | 60 | - SELECT blob_content FROM files WHERE file_path = 'LICENSE'
|
61 | 61 | -
|
62 |
| - ID: '0.16.0-11' |
| 62 | + ID: 'query11' |
63 | 63 | Name: 'Get all LICENSE blobs using pilosalib index'
|
64 | 64 | Statements:
|
65 | 65 | - CREATE INDEX file_path_idx ON files USING pilosalib (file_path) WITH (async = false)
|
66 | 66 | - SELECT blob_content FROM files WHERE file_path = 'LICENSE'
|
67 | 67 | -
|
68 |
| - ID: '0.16.0-12' |
| 68 | + ID: 'query12' |
69 | 69 | Name: '10 top repos by file count in HEAD'
|
70 | 70 | Statements:
|
71 | 71 | - SELECT repository_id, num_files FROM (SELECT COUNT(f.*) num_files, f.repository_id FROM ref_commits r INNER JOIN commit_files cf ON r.commit_hash = cf.commit_hash AND r.repository_id = cf.repository_id INNER JOIN files fON cf.repository_id = f.repository_id AND cf.blob_hash = f.blob_hash AND cf.tree_hash = f.tree_hash AND cf.file_path = f.file_path WHERE r.ref_name = 'HEAD' GROUP BY f.repository_id) t ORDER BY num_files DESC LIMIT 10
|
72 | 72 | -
|
73 |
| - ID: '0.16.0-13' |
| 73 | + ID: 'query13' |
74 | 74 | Name: 'Top committers per repository'
|
75 | 75 | Statements:
|
76 | 76 | - SELECT * FROM (SELECT commit_author_email as author,repository_id as id,count(*) as num_commits FROM commits GROUP BY commit_author_email, repository_id) t ORDER BY num_commits DESC"
|
77 | 77 | -
|
78 |
| - ID: '0.16.0-14' |
| 78 | + ID: 'query14' |
79 | 79 | Name: 'Top committers in all repositories'
|
80 | 80 | Statements:
|
81 | 81 | - SELECT * FROM (SELECT commit_author_email as author,count(*) as num_commits FROM commits GROUP BY commit_author_email) t ORDER BY num_commits DESC
|
82 | 82 | -
|
83 |
| - ID: '0.16.0-15' |
| 83 | + ID: 'query15' |
84 | 84 | Name: 'Union operation with pilosa index'
|
85 | 85 | Statements:
|
86 | 86 | - CREATE INDEX file_path_idx ON files USING pilosa (file_path) WITH (async = false)
|
87 | 87 | - SELECT blob_content FROM files WHERE file_path = 'LICENSE' OR file_path = 'README.md'
|
88 | 88 | - DROP INDEX file_path_idx ON files
|
89 | 89 | -
|
90 |
| - ID: '0.16.0-16' |
| 90 | + ID: 'query16' |
91 | 91 | Name: 'Union operation with pilosalib index'
|
92 | 92 | Statements:
|
93 | 93 | - CREATE INDEX file_path_idx ON files USING pilosalib (file_path) WITH (async = false)
|
94 | 94 | - SELECT blob_content FROM files WHERE file_path = 'LICENSE' OR file_path = 'README.md'
|
95 | 95 | - DROP INDEX file_path_idx ON files
|
96 | 96 | -
|
97 |
| - ID: '0.16.0-17' |
| 97 | + ID: 'query17' |
98 | 98 | Name: 'Count all commits with NOT operation'
|
99 | 99 | Statements:
|
100 | 100 | - SELECT COUNT(*) FROM commits WHERE NOT(commit_author_email = 'non existing email address');
|
101 | 101 | -
|
102 |
| - ID: '0.16.0-18' |
| 102 | + ID: 'query18' |
103 | 103 | Name: 'Count all commits with NOT operation and pilosalib index'
|
104 | 104 | Statements:
|
105 | 105 | - CREATE INDEX email_idx ON commits USING pilosalib (commit_author_email) WITH (async = false)
|
|
0 commit comments