Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github clickhouse queries improvements #2771

Merged
merged 1 commit into from Jun 17, 2021
Merged

Conversation

IvanIvanoff
Copy link
Member

Changes

  • Add proper zero filling for projects that have github organizations that are not producing any public events. Previously this would return an empty list.
  • Fix internal server error when aggregatedTimeseriesData was invoked on project with no github organization and return null.
  • Replace null with 0 in the aggregatedTimeseriesData when the project has github organization but no events.
{
  getMetric(metric: "dev_activity") {
    tet: aggregatedTimeseriesData(slug: "tether", from: "utc_now-30d", to: "utc_now") 
    san: aggregatedTimeseriesData(slug: "santiment", from: "utc_now-30d", to: "utc_now") 
    eth: aggregatedTimeseriesData(slug: "ethereum", from: "utc_now-30d", to: "utc_now") 
    mkr: aggregatedTimeseriesData(slug: "maker", from: "utc_now-30d", to: "utc_now") 
  }
}
{
  "data": {
    "getMetric": {
      "eth": 8424,
      "mkr": null,
      "san": 1229,
      "tet": 0
    }
  }
}

Ticket

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have tried to find clearer solution before commenting hard-to-understand parts of code
  • I have added tests that prove my fix is effective or that my feature works

@IvanIvanoff IvanIvanoff requested a review from tspenov June 17, 2021 13:45
@IvanIvanoff IvanIvanoff merged commit 12acc3f into master Jun 17, 2021
@delete-merged-branch delete-merged-branch bot deleted the improve-github-sql branch June 17, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant