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

[Explorer] Execution failed for question 3b9eaf90-82ae-4296-af07-21195260c04c: which repository has the most number of issues and pull requests #1761

Open
AbhinavAchha opened this issue May 29, 2024 · 1 comment

Comments

@AbhinavAchha
Copy link

Hi, It's failed to execute the question 3b9eaf90-82ae-4296-af07-21195260c04c which repository has the most number of issues and pull requests (errorType = error-query-execute):

  • executedAt: 2024-05-29T14:43:00.000+00:00
  • requestedAt: 2024-05-29T14:43:00.000+00:00

Error message

unexpected rpc resp is MPPStreamResponse

Generated SQL

SELECT
  `repo_name`,
  SUM(
    CASE
      WHEN `type` = 'IssuesEvent' THEN 1
      ELSE 0
    END
  ) + SUM(
    CASE
      WHEN `type` = 'PullRequestEvent' THEN 1
      ELSE 0
    END
  ) AS `total_issues_and_pull_requests`
FROM
  `github_events`
GROUP BY
  `repo_name`
ORDER BY
  `total_issues_and_pull_requests` DESC
LIMIT
  1
@JaySon-Huang
Copy link

JaySon-Huang commented May 31, 2024

The generated SQL cost too much memory to get the result. When I ask the same question, it generates another SQL and it can get the result successfully.

The pingcap teams will investigate whether the memory consumption of your post SQL can be optimized. Thanks for reporting it!

https://ossinsight.io/explore/?id=e28b7865-c396-4528-ac7c-7b39f577ffd8

SELECT
  `repo_name`,
  COUNT(*) AS `total_issues_and_pull_requests`
FROM
  `github_events`
WHERE
  `type` IN ('IssuesEvent', 'PullRequestEvent')
GROUP BY
  `repo_name`
ORDER BY
  `total_issues_and_pull_requests` DESC
LIMIT
  1

image

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

No branches or pull requests

2 participants