Skip to content

Commit c6796b7

Browse files
authored
Merge pull request #666 from kuba--/regression-queries/ordering
Fix ordering for regression queries.
2 parents 7000044 + 59429a2 commit c6796b7

File tree

3 files changed

+7
-34
lines changed

3 files changed

+7
-34
lines changed

_testdata/regression.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,59 +25,32 @@
2525
Statements:
2626
- 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
2727
-
28-
ID: 'query06'
29-
Name: 'Create pilosa index on language UDF'
30-
Statements:
31-
- CREATE INDEX language_idx ON files USING pilosa (language(file_path, blob_content)) WITH (async = false)
32-
- DROP INDEX language_idx ON files
33-
-
34-
ID: 'query08'
35-
Name: 'Query by language using the pilosa index'
36-
Statements:
37-
- CREATE INDEX language_idx ON files USING pilosa (language(file_path, blob_content)) WITH (async = false)
38-
- SELECT file_path FROM files WHERE language(file_path, blob_content) = 'Go'
39-
- DROP INDEX language_idx ON files
40-
-
41-
ID: 'query09'
28+
ID: 'query05'
4229
Name: 'Query all files from HEAD'
4330
Statements:
4431
- 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.history_index = 0
4532
-
46-
ID: 'query11'
47-
Name: 'Get all LICENSE blobs using pilosa index'
48-
Statements:
49-
- CREATE INDEX file_path_idx ON files USING pilosa (file_path) WITH (async = false)
50-
- SELECT blob_content FROM files WHERE file_path = 'LICENSE'
51-
- DROP INDEX file_path_idx ON files
52-
-
53-
ID: 'query12'
33+
ID: 'query06'
5434
Name: '10 top repos by file count in HEAD'
5535
Statements:
5636
- 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 f ON 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
5737
-
58-
ID: 'query13'
38+
ID: 'query07'
5939
Name: 'Top committers per repository'
6040
Statements:
6141
- 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) AS t ORDER BY num_commits DESC
6242
-
63-
ID: 'query14'
43+
ID: 'query08'
6444
Name: 'Top committers in all repositories'
6545
Statements:
6646
- 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
6747
-
68-
ID: 'query16'
69-
Name: 'Union operation with pilosa index'
70-
Statements:
71-
- CREATE INDEX file_path_idx ON files USING pilosa (file_path) WITH (async = false)
72-
- SELECT blob_content FROM files WHERE file_path = 'LICENSE' OR file_path = 'README.md'
73-
- DROP INDEX file_path_idx ON files
74-
-
75-
ID: 'query17'
48+
ID: 'query09'
7649
Name: 'Count all commits with NOT operation'
7750
Statements:
7851
- SELECT COUNT(*) FROM commits WHERE NOT(commit_author_email = 'non existing email address');
7952
-
80-
ID: 'query18'
53+
ID: 'query10'
8154
Name: 'Count all commits with NOT operation and pilosa index'
8255
Statements:
8356
- CREATE INDEX email_idx ON commits USING pilosa (commit_author_email) WITH (async = false)
File renamed without changes.

docs/using-gitbase/schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,4 @@ Diagram generated with MySQL Workbench. Edit the model in docs/assets/gitbase_mo
190190
191191
-->
192192

193-
![gitbase schema](/docs/assets/gitbase-db-diagram.png)
193+
![gitbase schema](/docs/assets/gitbase-schema.png)

0 commit comments

Comments
 (0)