-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ef01f2
commit d1a1217
Showing
19 changed files
with
1,156 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
test/testdata/code_change_commits/code_change_commits_desc_3_all_null_month.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"sql":"\nSELECT\n id,\n argMax(name, time) AS name,\n groupArrayInsertAt(\n 0,\n toUInt32(dateDiff('month', toDate('2015-1-1'), toDate('2016-12-1'))) + 1)(ROUND(count, 2),\n toUInt32(dateDiff('month', toDate('2015-1-1'), time))) AS commits_count\nFROM\n(\n SELECT\n toStartOfMonth(created_at) AS time,\n repo_id AS id, argMax(repo_name, time) AS name,\n COUNT(arrayJoin(push_commits.message)) AS count\n FROM gh_events\n WHERE type = 'PushEvent' AND (org_id IN [1342004]) AND created_at >= toDate('2015-1-1') AND created_at < dateAdd(month, 1, toDate('2016-12-1'))\n GROUP BY id, time\n \n)\nGROUP BY id\nORDER BY commits_count[-1] DESC\n LIMIT 3", | ||
"modifiedOption": { | ||
"orgIds": [ | ||
1342004 | ||
], | ||
"startYear": 2015, | ||
"endYear": 2016, | ||
"startMonth": 1, | ||
"endMonth": 12, | ||
"order": "DESC", | ||
"limit": 3, | ||
"limitOption": "all", | ||
"groupTimeRange": "month", | ||
"groupBy": null | ||
}, | ||
"code_change_commits_desc_3_all_null_month": [ | ||
{ | ||
"id": "19979068", | ||
"name": "google/rekall-profiles", | ||
"count": [ | ||
"6", | ||
"12", | ||
"14", | ||
"42", | ||
"16", | ||
"24", | ||
"6", | ||
"30", | ||
"18", | ||
"8", | ||
"6", | ||
"11", | ||
"15", | ||
"33", | ||
"18", | ||
"5", | ||
"30", | ||
"16", | ||
"23", | ||
"11", | ||
"6", | ||
"7", | ||
"22", | ||
"666" | ||
] | ||
}, | ||
{ | ||
"id": "9304637", | ||
"name": "google/ggrc-core", | ||
"count": [ | ||
"0", | ||
"0", | ||
"0", | ||
"885", | ||
"588", | ||
"230", | ||
"489", | ||
"502", | ||
"423", | ||
"227", | ||
"503", | ||
"489", | ||
"361", | ||
"401", | ||
"433", | ||
"426", | ||
"403", | ||
"653", | ||
"423", | ||
"350", | ||
"674", | ||
"499", | ||
"731", | ||
"571" | ||
] | ||
}, | ||
{ | ||
"id": "51965089", | ||
"name": "google/amphtml", | ||
"count": [ | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"141", | ||
"240", | ||
"136", | ||
"419", | ||
"453", | ||
"568", | ||
"429", | ||
"583", | ||
"819", | ||
"526" | ||
] | ||
} | ||
] | ||
} |
61 changes: 61 additions & 0 deletions
61
test/testdata/code_change_commits/code_change_commits_desc_3_all_null_quarter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"sql":"\nSELECT\n id,\n argMax(name, time) AS name,\n groupArrayInsertAt(\n 0,\n toUInt32(dateDiff('quarter', toDate('2015-1-1'), toDate('2016-12-1'))) + 1)(ROUND(count, 2),\n toUInt32(dateDiff('quarter', toStartOfQuarter(toDate('2015-1-1')), time))) AS commits_count\nFROM\n(\n SELECT\n toStartOfQuarter(created_at) AS time,\n repo_id AS id, argMax(repo_name, time) AS name,\n COUNT(arrayJoin(push_commits.message)) AS count\n FROM gh_events\n WHERE type = 'PushEvent' AND (org_id IN [1342004]) AND created_at >= toDate('2015-1-1') AND created_at < dateAdd(month, 1, toDate('2016-12-1'))\n GROUP BY id, time\n \n)\nGROUP BY id\nORDER BY commits_count[-1] DESC\n LIMIT 3", | ||
"modifiedOption": { | ||
"orgIds": [ | ||
1342004 | ||
], | ||
"startYear": 2015, | ||
"endYear": 2016, | ||
"startMonth": 1, | ||
"endMonth": 12, | ||
"order": "DESC", | ||
"limit": 3, | ||
"limitOption": "all", | ||
"groupTimeRange": "quarter", | ||
"groupBy": null | ||
}, | ||
"code_change_commits_desc_3_all_null_quarter": [ | ||
{ | ||
"id": "51965089", | ||
"name": "google/amphtml", | ||
"count": [ | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"141", | ||
"795", | ||
"1450", | ||
"1928" | ||
] | ||
}, | ||
{ | ||
"id": "9304637", | ||
"name": "google/ggrc-core", | ||
"count": [ | ||
"0", | ||
"1703", | ||
"1414", | ||
"1219", | ||
"1195", | ||
"1482", | ||
"1447", | ||
"1801" | ||
] | ||
}, | ||
{ | ||
"id": "19249835", | ||
"name": "google/WebFundamentals", | ||
"count": [ | ||
"342", | ||
"660", | ||
"1531", | ||
"1134", | ||
"774", | ||
"539", | ||
"1878", | ||
"1307" | ||
] | ||
} | ||
] | ||
} |
43 changes: 43 additions & 0 deletions
43
test/testdata/code_change_commits/code_change_commits_desc_3_all_null_year.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"sql":"\nSELECT\n id,\n argMax(name, time) AS name,\n groupArrayInsertAt(\n 0,\n toUInt32(dateDiff('year', toDate('2015-1-1'), toDate('2016-12-1'))) + 1)(ROUND(count, 2),\n toUInt32(dateDiff('year', toStartOfYear(toDate('2015-1-1')), time))) AS commits_count\nFROM\n(\n SELECT\n toStartOfYear(created_at) AS time,\n repo_id AS id, argMax(repo_name, time) AS name,\n COUNT(arrayJoin(push_commits.message)) AS count\n FROM gh_events\n WHERE type = 'PushEvent' AND (org_id IN [1342004]) AND created_at >= toDate('2015-1-1') AND created_at < dateAdd(month, 1, toDate('2016-12-1'))\n GROUP BY id, time\n \n)\nGROUP BY id\nORDER BY commits_count[-1] DESC\n LIMIT 3", | ||
"modifiedOption": { | ||
"orgIds": [ | ||
1342004 | ||
], | ||
"startYear": 2015, | ||
"endYear": 2016, | ||
"startMonth": 1, | ||
"endMonth": 12, | ||
"order": "DESC", | ||
"limit": 3, | ||
"limitOption": "all", | ||
"groupTimeRange": "year", | ||
"groupBy": null | ||
}, | ||
"code_change_commits_desc_3_all_null_year": [ | ||
{ | ||
"id": "9304637", | ||
"name": "google/ggrc-core", | ||
"count": [ | ||
"4336", | ||
"5925" | ||
] | ||
}, | ||
{ | ||
"id": "19249835", | ||
"name": "google/WebFundamentals", | ||
"count": [ | ||
"3667", | ||
"4498" | ||
] | ||
}, | ||
{ | ||
"id": "51965089", | ||
"name": "google/amphtml", | ||
"count": [ | ||
"0", | ||
"4314" | ||
] | ||
} | ||
] | ||
} |
49 changes: 49 additions & 0 deletions
49
test/testdata/code_change_commits/code_change_commits_desc_3_all_org_month.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"sql":"\nSELECT\n id,\n argMax(name, time) AS name,\n groupArrayInsertAt(\n 0,\n toUInt32(dateDiff('month', toDate('2015-1-1'), toDate('2016-12-1'))) + 1)(ROUND(count, 2),\n toUInt32(dateDiff('month', toDate('2015-1-1'), time))) AS commits_count\nFROM\n(\n SELECT\n toStartOfMonth(created_at) AS time,\n org_id AS id, argMax(org_login, time) AS name,\n COUNT(arrayJoin(push_commits.message)) AS count\n FROM gh_events\n WHERE type = 'PushEvent' AND (org_id IN [1342004]) AND created_at >= toDate('2015-1-1') AND created_at < dateAdd(month, 1, toDate('2016-12-1'))\n GROUP BY id, time\n \n)\nGROUP BY id\nORDER BY commits_count[-1] DESC\n LIMIT 3", | ||
"modifiedOption": { | ||
"orgIds": [ | ||
1342004 | ||
], | ||
"startYear": 2015, | ||
"endYear": 2016, | ||
"startMonth": 1, | ||
"endMonth": 12, | ||
"order": "DESC", | ||
"limit": 3, | ||
"limitOption": "all", | ||
"groupTimeRange": "month", | ||
"groupBy": "org" | ||
}, | ||
"code_change_commits_desc_3_all_org_month": [ | ||
{ | ||
"id": "1342004", | ||
"name": "google", | ||
"count": [ | ||
"4220", | ||
"4964", | ||
"5997", | ||
"7825", | ||
"7173", | ||
"5726", | ||
"7837", | ||
"8141", | ||
"7895", | ||
"7548", | ||
"5143", | ||
"5550", | ||
"5363", | ||
"5472", | ||
"5527", | ||
"5227", | ||
"5447", | ||
"7053", | ||
"6856", | ||
"7091", | ||
"6943", | ||
"7243", | ||
"6261", | ||
"6731" | ||
] | ||
} | ||
] | ||
} |
33 changes: 33 additions & 0 deletions
33
test/testdata/code_change_commits/code_change_commits_desc_3_all_org_quarter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"sql":"\nSELECT\n id,\n argMax(name, time) AS name,\n groupArrayInsertAt(\n 0,\n toUInt32(dateDiff('quarter', toDate('2015-1-1'), toDate('2016-12-1'))) + 1)(ROUND(count, 2),\n toUInt32(dateDiff('quarter', toStartOfQuarter(toDate('2015-1-1')), time))) AS commits_count\nFROM\n(\n SELECT\n toStartOfQuarter(created_at) AS time,\n org_id AS id, argMax(org_login, time) AS name,\n COUNT(arrayJoin(push_commits.message)) AS count\n FROM gh_events\n WHERE type = 'PushEvent' AND (org_id IN [1342004]) AND created_at >= toDate('2015-1-1') AND created_at < dateAdd(month, 1, toDate('2016-12-1'))\n GROUP BY id, time\n \n)\nGROUP BY id\nORDER BY commits_count[-1] DESC\n LIMIT 3", | ||
"modifiedOption": { | ||
"orgIds": [ | ||
1342004 | ||
], | ||
"startYear": 2015, | ||
"endYear": 2016, | ||
"startMonth": 1, | ||
"endMonth": 12, | ||
"order": "DESC", | ||
"limit": 3, | ||
"limitOption": "all", | ||
"groupTimeRange": "quarter", | ||
"groupBy": "org" | ||
}, | ||
"code_change_commits_desc_3_all_org_quarter": [ | ||
{ | ||
"id": "1342004", | ||
"name": "google", | ||
"count": [ | ||
"15181", | ||
"20724", | ||
"23873", | ||
"18241", | ||
"16362", | ||
"17727", | ||
"20890", | ||
"20235" | ||
] | ||
} | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
test/testdata/code_change_commits/code_change_commits_desc_3_all_org_year.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"sql":"\nSELECT\n id,\n argMax(name, time) AS name,\n groupArrayInsertAt(\n 0,\n toUInt32(dateDiff('year', toDate('2015-1-1'), toDate('2016-12-1'))) + 1)(ROUND(count, 2),\n toUInt32(dateDiff('year', toStartOfYear(toDate('2015-1-1')), time))) AS commits_count\nFROM\n(\n SELECT\n toStartOfYear(created_at) AS time,\n org_id AS id, argMax(org_login, time) AS name,\n COUNT(arrayJoin(push_commits.message)) AS count\n FROM gh_events\n WHERE type = 'PushEvent' AND (org_id IN [1342004]) AND created_at >= toDate('2015-1-1') AND created_at < dateAdd(month, 1, toDate('2016-12-1'))\n GROUP BY id, time\n \n)\nGROUP BY id\nORDER BY commits_count[-1] DESC\n LIMIT 3", | ||
"modifiedOption": { | ||
"orgIds": [ | ||
1342004 | ||
], | ||
"startYear": 2015, | ||
"endYear": 2016, | ||
"startMonth": 1, | ||
"endMonth": 12, | ||
"order": "DESC", | ||
"limit": 3, | ||
"limitOption": "all", | ||
"groupTimeRange": "year", | ||
"groupBy": "org" | ||
}, | ||
"code_change_commits_desc_3_all_org_year": [ | ||
{ | ||
"id": "1342004", | ||
"name": "google", | ||
"count": [ | ||
"78019", | ||
"75214" | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.